API错误代码:191共享对话框中的Facebook UI
问题描述:
API错误代码:191共享对话框中的Facebook UIAPI错误代码:191共享对话框中的Facebook UI
我一直在试图使FB.ui工作。 Unforunately,我不断收到一个错误:如果我去我的应用程序的基本信息在https://developers.facebook.com/
我看不出有任何问题
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.
,一切都看起来不错:
App ID: 471513259597047
Display Name: Calculator
Site URL: http://www.calculator.com
我填一切都需要,但我仍然得到了191错误。顺便说一句,我正在localhost中测试这个。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>My Feed Dialog Page</title>
</head>
<body>
<div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
<p id='msg'></p>
<script>
FB.init({appId: "471513259597047", status: true, cookie: true});
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
redirect_uri: 'http://www.calculator.com',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
name: 'Facebook Dialogs',
caption: 'Reference Documentation',
description: 'Using Dialogs to interact with people.'
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
}
</script>
</body>
</html>
答
我认为,有URL之间有些不吻合,同时创造上developers.facebook.com Facebook应用程序,并在代码中指定的URL指定,交叉检查它。
_“我正在按照以下方式在本地主机上测试这个”_ - 然后在您的应用设置中设置本地主机URL(并且不要明确设置redirect_uri,因为在大多数情况下,软件开发工具包)。 – CBroe