Created
March 14, 2012 23:32
-
-
Save vinigracindo/2040388 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From django.contrib.auth.models import User | |
From user_auth.models import UserSocialAuth | |
import facebook # (Facebook.py [3]) | |
user = User.objects.get(id=10) # Suponha que existe um usuário 10 com facebook | |
access_token = UserSocialAuth.objects.get(user = user, provider = 'facebook').extra_data['access_token'] | |
user._facebook = facebook.GraphAPI(access_token) | |
user.facebook | |
>> <facebook.GraphAPI object [...]> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment