Facebook应用程序验证令牌获取错误 [英] Facebook Application Auth Token Get Error
问题描述
我试图通过Facebook API Graph Exlorer为我的应用程序请求authtoken以下的facebook:说明。当我使用以下形式的URL进行get调用时:
https://graph.facebook.com/oauth/ access_token?client_id = YOUR_APP_ID& client_secret = YOUR_APP_SECRET& grant_type = client_credentials
我得到以下错误: p
$ b $ $ $
$ error $ {
message:回调无效,
键入:OAuthException,
code:1
}
}
有关如何获取我的应用程序的访问令牌的建议将不胜感激!
如果我尝试以编程方式获得访问代码,以下代码:
FB.api('/ oauth / access_token?client_id = {APP_ID}& client_secret = {APP_SECRET}& amp ; grant_type = client_credentials',function(response){
alert(JSON.stringify(response));
});
我得到以下错误:
{error:load-error:unknown}
您无法使用Facebook Graph API浏览器执行此命令。
直接在浏览器中输入它会根据需要返回访问令牌。
I am trying to request the authtoken for my app via the Facebook API Graph Exlorer following the facebooks instructions. When I do a get call with a URL with the following form:
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials
I get the following error:
{
"error": {
"message": "Invalid callback",
"type": "OAuthException",
"code": 1
}
}
Suggestions on how I might go about obtaining the access token for my app would be greatly appreciated!
If I try to obtain the access code programmatically running the following code:
FB.api('/oauth/access_token?client_id={APP_ID}&client_secret={APP_SECRET}&grant_type=client_credentials', function(response) {
alert(JSON.stringify(response));
});
I get the following error:
{"error":"load-error: unknown"}
You cannot execute this command using the Facebook Graph API explorer. Typing it directly into the browser returns the access token as desired.
这篇关于Facebook应用程序验证令牌获取错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!