我试图通过Facebook图形API模拟在Facebook中搜索用户。我正在使用facebook-sdk
下面是我的代码。在
import facebook
access_token = "MY_ACCESS_TOKEN"
graph = facebook.GraphAPI(access_token)
def try_query(string):
query = 'search/?q=' + string + '&type=user'
data = graph.request(query)
return len(data['data'])
#My profile
print (" Pratibha Jagnere : ",try_query("Pratibha Jagnere"))
# some random name
print (" Stephen Foster : ",try_query("Stephen Foster"))
它给了我低于输出的输出。在
^{pr2}$我不明白为什么它不给我自己的名字的结果。任何帮助都将不胜感激。在
目前没有回答
相关问题 更多 >
编程相关推荐