简体   繁体   English

不支持Facebook Graph API版本

[英]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 你要么

  • have to use an app id that still allows you to use a lower API version, or 必须使用仍允许您使用较低API版本的应用ID,或者
  • wait for an update of the library, or 等待库的更新,或者
  • see where the library does this check and manually add 3.1 to the list there. 查看库在哪里进行此检查,然后手动将3.1添加到该列表中。

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.

相关问题 Python:Facebook Graph API - 使用facebook-sdk的分页请求 - Python: Facebook Graph API - pagination request using facebook-sdk 重置Facebook页面的未读邮件数(Facebook Graph API) - Reset unread message count for Facebook page (Facebook Graph API) 是否有解决新版本Graph API的Facebook生日事件的解决方法? - Is there any workaround for fetching Facebook birthday events in newer versions of Graph API? 如何在我自己的Facebook页面(graph-api)上发布而不在Facebook开发人员上创建应用程序 - How to publish on my own Facebook Page (graph-api) without creating an App on Facebook developer Selenium Chrome Webdriver版本“不支持”吗? - Selenium Chrome Webdriver Version “Not Supported”? 下载Group I的所有帖子,拥有使用Facebook Graph API的管理员权限 - Download all posts for Group I have Admin rights to using Facebook Graph API 使用access_token向Facebook的Graph API发出POST请求 - Using an access_token to make a POST request to Facebook's Graph API 通过 Facebook Graph API 发布 url 不会嵌入 url,只是将其作为 url - Posting url through Facebook Graph API does not embed the url, just puts it as a url Facebook GraphAPI 版本出错 || GraphAPIError:有效的 API 版本为“2.8”、“2.9”、“2.10”、“2.11”、“2.12”、“3.0”、“3.1” - Error in Facebook GraphAPI Version || GraphAPIError: Valid API versions are '2.8', '2.9', '2.10', '2.11', '2.12', '3.0', '3.1' Bigquery Python API不支持的数组 - Arrays not supported in Bigquery Python API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM