我想用python为Facebook获取一个long-live访问令牌。你知道吗
这是我找到的代码:
from facepy.utils import get_extended_access_token
app_id = 'xxx'
app_secret = 'yyy'
short_lived_access_token = "Token"
LONG_LIVE_ACCESS_TOKEN, expires_at = get_extended_access_token(
short_lived_access_token,
app_id, app_secret)
f = open("f.txt","w")
f.write(LONG_LIVE_ACCESS_TOKEN)
print expires_at
主要问题是,如果我把它生成的代码放在我的程序中,会出现以下错误:
facepy.exceptions.FacebookError: [100] API calls from the server require an appsecret_proof argument
据我所知,这意味着我用错了令牌。 如何解决这个问题?你知道吗
我不知道图书馆是做什么的,但是
包含有关如何使用
appsecret_proof
的信息。你知道吗否则,还可以使用普通的httpget调用扩展访问令牌,如中所述
相关问题 更多 >
编程相关推荐