Facebook 提要对话框返回 API 错误代码:191 [英] Facebook Feed Dialog Returns API Error Code: 191
问题描述
在我的 Facebook 应用程序中,我总是会收到以下错误:
In my Facebook App I'll always get the following error :
发生错误.请稍后再试.API 错误代码:191API 错误描述:指定的 URL 不属于应用程序错误消息:redirect_uri 不属于应用程序.
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.
我只想通过按钮提供帖子,我的代码是
I just want to feed a post via button my code is
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
link: 'https://mydomain.com/',
picture: 'https://mydomain.com/img/feed.png',
name: 'BLABLADialog',
caption: 'UeberschriftBLABLA',
description: 'DescriptionBLABLA',
show_error: true
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
}
我的 Canvas-URL 是http://mydomain.com/"
我的安全画布-URL 是https://mydomain.com/"
我的 Tab-URL 是https://mydomain.com/tab.php"
我的安全 Tab-URL 是https://mydomain.com/tab.php"
我使用 Facebook 登录网站 URL 的网站是https://mydomain.com/"
my Canvas-URL is "http://mydomain.com/"
my Secure Canvas-URL is "https://mydomain.com/"
my Tab-URL is "https://mydomain.com/tab.php"
my Secure Tab-URL is "https://mydomain.com/tab.php"
my Website with Facebook Login SITE URL is "https://mydomain.com/"
所以我做错了什么?
推荐答案
您需要在 var obj
数组中包含一个 redirect_uri.在 Feed Dialog 文档 上,指定了 redirect_uri
如:
You need to include a redirect_uri in your var obj
array. On the Feed Dialog documentation, redirect_uri
is specified as:
用户单击对话框上的按钮后重定向到的 URL.必需,但大多数 SDK 会自动指定.
The URL to redirect to after the user clicks a button on the dialog. Required, but automatically specified by most SDKs.
因此必须指定它,并且必须是位于您应用的站点 URL 下的 URL.
So it must be specified, and it must a URL that falls under the Site URL of your app.
这篇关于Facebook 提要对话框返回 API 错误代码:191的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!