Tasks¶
- django_facebook.tasks.extend_access_token(profile, access_token)[source]¶
Extends the access token to 60 days and saves it on the profile
Parameters: - profile – the profile or user object
- access_token (string) – a valid access token
- django_facebook.tasks.store_likes(user, likes)[source]¶
Inserting again will not cause any errors, so this is safe for multiple executions
Parameters: - user (User object) – The user for which we are storing
- friends (list) – List of your likes
- django_facebook.tasks.store_friends(user, friends)[source]¶
Inserting again will not cause any errors, so this is safe for multiple executions
Parameters: - user (User object) – The user for which we are storing
- friends (list) – List of your friends
- django_facebook.tasks.get_and_store_likes(user, facebook)[source]¶
Since facebook is quite slow this version also runs the get on the background
Inserting again will not cause any errors, so this is safe for multiple executions
Parameters: - user (User object) – The user for which we are storing
- facebook (FacebookUserConverter object) – The graph connection to facebook
- django_facebook.tasks.get_and_store_friends(user, facebook)[source]¶
Since facebook is quite slow this version also runs the get on the background
Inserting again will not cause any errors, so this is safe for multiple executions
Parameters: - user (User object) – The user for which we are storing
- facebook (FacebookUserConverter object) – The graph connection to facebook
Removes the given open graph share
Parameters: share – the open graph share object
We will retry open graph shares after 15m to make sure we dont miss out on any shares if Facebook is having a minor outage
We retry the open graph shares for a user when he gets a new access token