[英]AttributeError: module 'facebook' has no attribute 'GraphAPI'
[英]'get_all_connections' no attribute error with Facebook GraphAPI
我正在尝试创建一个脚本,以使用GraphAPI从Facebook提取所有数据,但是在使用http://facebook-sdk.readthedocs.io/en/latest/api文档中的“ get_all_connections”方法时遇到了麻烦。 html ,他们似乎没有提到任何问题。 这是脚本:
from bs4 import BeautifulSoup as BS
import requests
import facebook
token = 'mytoken'
graph = facebook.GraphAPI(access_token = token, version='2.7')
friends = graph.get_all_connections(id='id',
connection_name='comments')
print friends
输出是
AttributeError: 'GraphAPI' object has no attribute 'get_all_connections'
Facebook Changelog说, get_all_connections()
将在3.0.0版中可用(未发布) 。
(您提供的链接中的side_menu上有一个指向Changelog的链接,位于API参考的正下方)。
称它为“最新”是很容易引起误解的……而且很懒惰; o)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.