#coding:utf-8
import json, urllib2
import facebook
from setting import *
def getFriendsFromperson(person_id):
fb_friends = graph.get_connections(id=person_id, connection_name='events')
print(fb_friends)
facebook_app_id = 'xxxxxxxx'
facebook_app_secret = 'xxxxxxxxxxxxxxx'
facebook_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxx'
facebook_tedxutokyo_event = '682438141897525'
graph = facebook.GraphAPI(facebook_access_token)
event = graph.get_object(id=facebook_tedxutokyo_event, Connection='invited')
attending = graph.get_connections(id=facebook_tedxutokyo_event , connection_name='maybe', limit= 100)
# attending2 = graph.get_connections(id=facebook_tedxutokyo_event , connection_name='attending')
persons_id = {}
persons_pictures = {}
count = 0
for person in attending['data']:
person_name = person['name'].encode('utf-8')
person_id = person['id'].encode('utf-8')
persons_id[person_name] = person_id
print(person_id)
count += 1
print(count)
Der Punkt ist, ein Limit hinzuzufügen (25 Standardeinstellungen)
Recommended Posts