[英]Facebook Graph API version not supported
I want to access a facebook page data, and my fb Graph API version is 3.1 , when i am writting this(in python): 我想访问一个facebook页面数据,而我在Python中用fb Graph API编写的版本是3.1 :
graph = facebook.GraphAPI(access_token=token, version = 3.1)
it gives a version error, ie: 它给出版本错误,即:
facebook.GraphAPIError: Valid API versions are '2.7', '2.8', '2.9', '2.10', '2.11', '2.12', '3.0'
how can i access facebook Graph API through my version in python. 我如何通过我的python版本访问facebook Graph API。 Thanks in advance.
提前致谢。
You will either 你要么
If you are using this library https://github.com/mobolic/facebook-sdk/ , you can edit the __init__.py
file, which currently contains the following line: 如果您正在使用此库https://github.com/mobolic/facebook-sdk/ ,则可以编辑
__init__.py
文件,该文件当前包含以下行:
VALID_API_VERSIONS = ["2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "3.0"]
If you add "3.1"
to that list, you should be able to use API version 3.1 without getting this error. 如果将
"3.1"
添加到该列表,则应该能够使用API版本3.1,而不会出现此错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.