Facebook Graph API未返回完整数据

时间:2018-06-19 14:14:02

标签: python facebook facebook-graph-api

我正在使用Facebook Graph API来获取我所有朋友的数据,包括他们的电子邮件,生日,喜欢,帖子等。我已经生成了所需的扩展访问令牌,并且正在运行以下脚本:

import urllib3
import facebook as fb
import requests

token = <my token>
me_url = 'https://graph.facebook.com/v2.9/me?access_token=' + token
friends_url = 'https://graph.facebook.com/v2.9/me/friends?access_token=' + token
search_url = 'https://graph.facebook.com/v2.9/search?q=mark zukerberg&type=user&access_token=' + token

me = requests.get(me_url)
friends = requests.get(friends_url)
search = requests.get(search_url)

print(me.text)
print(friends.text)
print(search.text)

我得到的输出是这样:

{"name":"Soumik Rakshit","id":"<some id>"}
{"data":[],"summary":{"total_count":753}}
{"data":[]}

为什么我没有获得为之生成访问令牌的所有数据?

0 个答案:

没有答案