AttributeError:“GraphAPI”对象没有属性“search”

2024-03-28 22:30:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试应用此代码:

 users = graph.search(type='user',q='Mark Zuckerberg')
 for user in users['data']:
 print('%s %s' % (user['id'],user['name'].encode()))

从这个链接:http://facebook-sdk.readthedocs.io/en/latest/api.html

在python脚本中,我得到一个错误“AttributeError:'GraphAPI'object has no attribute'search'”

任何帮助都将非常感谢,因为我在网上搜索,在StackOverflow上我什么也没有。在

提前谢谢


Tags: 代码nameinidforsearchdatatype