我正在尝试检索一个相当大的Facebook群组(只有一万多名成员)的所有用户的列表。但是,脚本在五千名成员之前停止下载。我没有收到任何错误消息,所以我现在想知道我的代码是错误的还是Facebook有限制(没有错误)我一直在打?这是我的代码:
from facepy import GraphAPI
from django.core.serializers.json import DjangoJSONEncoder
import json
group_id =""
access_token = ""
graph = GraphAPI(access_token)
# "limit" can be altered, but won't change how much I can download
pages = graph.get(group_id + "/members", page=True, retry=3, limit=10000)
i = 0
for p in pages:
print('Downloading page', i)
with open('%scontent%i.json' % (group_id, i), 'w') as outfile:
json.dump(p, outfile, indent = 4, cls=DjangoJSONEncoder, ensure_ascii=False)
i += 1
答案 0 :(得分:1)
有一个旧的错误:https://developers.facebook.com/bugs/267362886791339/
正如您所看到的,这是一个众所周知的错误,但Facebook不会修复它。