【发布时间】:2011-10-07 21:59:06
【问题描述】:
请帮忙!我正在 Facebook 上为比赛创建一个 Facebook 选项卡/应用程序,比赛的一部分是让用户可以选择在他们的墙上分享比赛。这是我收到的错误 -
API 错误代码:191 API 错误描述:指定的 URL 不属于应用程序 错误消息:redirect_uri 不属于应用程序。
这是我的 facebook 验证码:
<div id='fb-root'></div>
<script>
FB.init( {
appId : 219691398094935,
status : true,
cookie : true,
xfbml : true
}
);
window.fbAsyncInit = function() {
FB.Canvas.setAutoResize();
}
</script>
<script src='http://connect.facebook.net/en_US/all.js'></script>
这是我的 FB.ui 代码:
<script>
function showStreamPublish() {
FB.ui(
{
method: 'feed',
name: 'I signed up to win an iPad 2 from Upillar.com',
link: 'http://www.facebook.com/pages/udev/121216321302968?sk=app_219691398094935',
picture: 'http://static.upillar.com/fb/images/logo.png',
description: 'I entered the iPad 2 Sweepstakes from Upillar.com which only requires you to create a listing to enter! Enter the contest now by by clicking this link.',
app_id: '219691398094935'
},
function(response) {
if (response && response.post_id) {
$('#main-screen').css('display','none');
$('#step2').css('display','block');
}else{
$('#main-screen').css('display','none');
$('#step2').css('display','block');
}
});}
</script>
这是我的应用程序中的信息:
站点/应用程序域:upillar.com
网站网址:http://fb.upillar.com/contest.php
页面标签 URL:http://fb.upillar.com/contest.php
安全标签 URL:https://fb.upillar.com/contest.php
请告诉我我错过了什么!非常感谢。
【问题讨论】:
-
尝试在您的网址末尾使用 /
-
Usman,感谢您的回复,我用fb.upillar.com 和upillar.com 两种形式都试过了,但我仍然收到错误。
-
抱歉耽搁了,我认为您必须将
redirect_uri设置为 apps.facebook.com/yourapp 。我不知道如何使用 JS SDK 来做到这一点。在 PHP SDK 中,我使用getLoginUrl设置。
标签: facebook