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
import os | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_frontend.settings' | |
from open_facebook.api import * | |
access_token ='AAACEdEose0cBAKiYPHcTG17gBhuZAUauHWsJH2aP8Oj4yeZCF7jZCvoLK1WGodyluzgQ1PxPTlLNZAynJ6Qo8TAZBqftxa7FTA4rCiB63oQZDZD' | |
fb = OpenFacebook(access_token) | |
#print fb.get('me/accounts') | |
permissions = [p for p, v in fb.get( | |
'me/permissions')['data'][0].items() if v] | |
#print permissions | |
#print fb.fql("SELECT uid,name FROM user WHERE uid IN " \ | |
# "(SELECT uid2 FROM friend WHERE uid1 = me())") | |
facebook_friends = fb.get('me/friends') | |
print facebook_friends["data"] | |
for element in facebook_friends["data"]: | |
# print element["name"][0] | |
for key in element: | |
print key | |
print element[key] | |
print fb.get(element[key]+'/feed') | |
#fb_feed = fb.get('me/feed') | |
#print fb_feed | |
No comments:
Post a Comment