【发布时间】:2015-05-01 05:58:51
【问题描述】:
我想读取用户的 apprequest-id。我已经完成了下面的功能:
-
获取服务器令牌:
url = "https://graph.facebook.com/oauth/access_token?client_id=#{app_id}&client_secret=#{secret_key}&grant_type=client_credentials" 然后,我构建了将 user_token 作为 {client_access_token} 发送到服务器的函数
-
所以,我调用这个函数来获取 AppRequest 为 json
url = "https://graph.facebook.com/v2.3/#{fb_id}/apprequests/?input_token=#{client_access_token}&access_token=#{server_access_token}"
我得到了这个错误:
{
"error": {
"message": "(#15) Requires session when calling from a desktop app",
"type": "OAuthException",
"code": 15
}
}
起初,我认为 URL 调用或访问令牌有问题,但我已经用相同的 input_token 和 access_token。而且,它可以正常工作。请帮忙。
【问题讨论】:
标签: facebook facebook-graph-api-v2.3