作者kiwistar (暴风雪之喀秋莎)
看板Python
标题[问题] Facebook sdk for Python的__init__
时间Fri Apr 13 12:03:02 2018
graph = facebook.GraphAPI(access_token = (my token), version = '2.12')
这行一直出现:
GraphAPIError("Version number should be in the"
facebook.GraphAPIError: Version number should be in the following format:
#.# (e.g. 2.0).
可能是格式不对导致系统判定版本时出错
因为我把2.12改成2.7就不会有错了
我查到的__init__是有五个参数的,如果self不算的话
可是官方文件上面
http://facebook-sdk.readthedocs.io/en/latest/api.html
虽然有提到__init__有五个参数,
access_token, timeout, version, proxies, session
但网页上的example却长这样
graph = facebook.GraphAPI(access_token="your_token", version="2.12")
而且前面timeout, proxies我都没有写,也没有报错
请问有人遇到一样的问题吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 223.136.175.220
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1523592189.A.B02.html
1F:推 kenduest: print(facebook.VALID_API_VERSIONS) 显示列表资讯是? 04/13 15:24
2F:→ kenduest: 最有可能是你装的版本 module 太旧当时候版本不支援2.12 04/13 15:25