Javascript facebook的提要按钮不工作
$i在JS控制台中获得以下内容 错误 Sharebutton出现错误。请稍后再试 API错误代码:191 API错误描述:指定的URL不属于应用程序 错误消息:应用程序不拥有重定向uri 而我把我的配置如下 应用程序显示名称: 应用程序命名空间: 联络电邮: 应用程序域: www.somthing.com ------------------------------------jsJavascript facebook的提要按钮不工作,javascript,facebook-javascript-sdk,Javascript,Facebook Javascript Sdk,$i在JS控制台中获得以下内容 错误 Sharebutton出现错误。请稍后再试 API错误代码:191 API错误描述:指定的URL不属于应用程序 错误消息:应用程序不拥有重定向uri 而我把我的配置如下 应用程序显示名称: 应用程序命名空间: 联络电邮: 应用程序域: www.somthing.com ------------------------------------js <script> window.fbAsyncInit= function() { FB.i
<script>
window.fbAsyncInit= function() {
FB.init({
appId : '204143816348127', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
function kuky(){
FB.ui(
{
method: 'feed',
message: 'getting educated about Facebook Connect',
name: 'Connect',
caption: 'The Facebook Connect JavaScript SDK',
description: (
'A small JavaScript library that allows you to harness ' +
'the power of Facebook, bringing the user\'s identity, ' +
'social graph and distribution power to your site.'
),
link: 'http://www.fbrell.com/',
picture: 'http://www.fbrell.com/f8.jpg',
actions: [
{ name: 'fbrell', link: 'http://www.fbrell.com/' }
],
user_message_prompt: 'Share your thoughts about RELL'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
}
</script>
window.fbAsyninit=函数(){
FB.init({
appId:'204143816348127',//应用ID
状态:true,//检查登录状态
cookie:true,//启用cookie以允许服务器访问会话
xfbml:true//解析xfbml
});
//这里有额外的初始化代码
};
//异步加载SDK
(职能(d){
var js,id='facebook jssdk';if(d.getElementById(id)){return;}
js=d.createElement('script');js.id=id;js.async=true;
js.src=“//connect.facebook.net/en_US/all.js”;
d、 getElementsByTagName('head')[0].appendChild(js);
}(文件);
函数kuky(){
FB.ui(
{
方法:“提要”,
信息:“接受关于Facebook Connect的教育”,
名称:“连接”,
标题:“Facebook连接JavaScript SDK”,
说明:(
“一个小型JavaScript库,允许您利用”+
“Facebook的力量,带来了用户的身份,”+
“社交图和网站的分布能力。”
),
链接:'http://www.fbrell.com/',
图片:'http://www.fbrell.com/f8.jpg',
行动:[
{名称:'fbrell',链接:'http://www.fbrell.com/' }
],
用户\消息\提示:“分享您对RELL的想法”
},
功能(响应){
if(应答和应答后id){
警报(“发布帖子”);
}否则{
警报(“未发布帖子”);
}
}
);
}
191通常是因为代码不是从应用程序设置中的域运行的。另外,确保在FB.init()中包含channelURL以获得更好的性能