API¶
-
class
django_facebook.api.
FacebookUserConverter
(open_facebook)[source]¶ This conversion class helps you to convert Facebook users to Django users
Helps with - extracting and prepopulating full profile data - invite flows - importing and storing likes
-
facebook_profile_data
()[source]¶ Returns the facebook profile data, together with the image locations
-
facebook_registration_data
(username=True)[source]¶ Gets all registration data and ensures its correct input for a django registration
-
get_and_store_friends
(user)[source]¶ Gets and stores your facebook friends to DB Both the get and the store run in a async task when FACEBOOK_CELERY_STORE = True
-
get_and_store_likes
(user)[source]¶ Gets and stores your facebook likes to DB Both the get and the store run in a async task when FACEBOOK_CELERY_STORE = True
-
registered_friends
(user)[source]¶ Returns all profile models which are already registered on your site and a list of friends which are not on your site
-
-
django_facebook.api.
get_facebook_graph
(request=None, access_token=None, redirect_uri=None, raise_=False)[source]¶ given a request from one of these - js authentication flow (signed cookie) - facebook app authentication flow (signed cookie) - facebook oauth redirect (code param in url) - mobile authentication flow (direct access_token) - offline access token stored in user profile
returns a graph object
redirect path is the path from which you requested the token for some reason facebook needs exactly this uri when converting the code to a token falls back to the current page without code in the request params specify redirect_uri if you are not posting and recieving the code on the same page
-
django_facebook.api.
get_persistent_graph
(request, *args, **kwargs)[source]¶ Wraps itself around get facebook graph But stores the graph in the session, allowing usage across multiple pageviews. Note that Facebook session’s expire at some point, you can’t store this for permanent usage Atleast not without asking for the offline_access permission