0

您好我遇到了以下问题:我希望用户验证我的应用程序,所以我想显示授权对话框。为此,我尝试了 api 功能

FB.api("/dialog/oauth", "get", {client_id: APP_ID, redirect_uri: URI}, function(response){
    console.log(response);
});

但我得到这个错误:

code: 2500
message: "Unknown path components: /oauth"
type: "OAuthException"

但为什么?FB.api 调用应该是一样的

http://www.facebook.com/dialog/oauth?client_id=<app-id>&redirect_uri=<uri>

If i put this url in the browser directly, the dialog is shown. ('window.location' also doesn´t work because of x-frame-options)

4

1 回答 1

1

使用 JavaScript SDK 的FB.login方法http://developers.facebook.com/docs/reference/javascript/FB.login/

于 2012-10-18T10:58:33.473 回答