我试图使用Facebook提要对话但它不起作用

时间:2013-01-31 04:32:12

标签: facebook facebook-javascript-sdk

只是尝试将Feed发布到我的墙上,但收到了错误消息

An error occurred. Please try again later.

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.

这是我的代码

var app_url = http://xxx.xxx.xxx.xxx;
var fb_app_id = xxxxxxxxxx;
// When init
FB.init({
    appId: fb_app_id, 
    status: true, 
    cookie: true, 
    xfbml: true, 
    frictionlessRequests: true, 
    useCachedDialogs: true, 
    oauth: true
});
// When posting
FB.ui({
    method : 'feed',
    link : 'http://apps.facebook.com/' + fb_app_id,
    redirect_uri : app_url + 'facebook/index.php',
    picture : app_url + 'icon/fb_feed_lvup.png',
    name : 'My Game',
    caption : 'Player level up to ' + level + '!!',
    description : 'Congratulation :D'
},
function callback(response) {
    // Callback after feed posted...
    console.log('publishStory UI response: ', response);
});

我不知道它与我的应用设置相关,但未设置" App Domains"不是吗?

我无法设置,因为主机没有域名我只是使用IP地址来设置网址设置。

1 个答案:

答案 0 :(得分:0)

试试这个 -

Site URL从应用设置复制到redirect_url,然后检查它是否有效。

我查了一下,否则一切都很好。