【发布时间】:2016-09-09 10:13:48
【问题描述】:
我想在下面的代码中以get_object()in 的用户身份发送朋友姓名,以获取他的公开帖子。但我收到错误
引发 GraphAPIError(结果) facebook.GraphAPIError: (#803) 无法通过用户名查询用户 (tayyab.rasheed.545)
user = 'tayyab.rasheed.545' #is giving error
#user = 'BillGates' #is working fine.
# user = 'me' #is working fine.
graph = facebook.GraphAPI(access_token)
profile = graph.get_object(user)
posts = graph.get_connections(profile['id'], 'posts')
为什么会出错?我想我做错了什么。 BillGates 和 me 工作正常,那么为什么不 tayyab.rasheed.545 朋友的个人资料是 'https://www.facebook.com/tayyab.rasheed.545'
【问题讨论】:
-
btw,这个已经回答了,请先使用搜索功能:stackoverflow.com/questions/30886468/…
标签: python facebook facebook-graph-api