我正在为我们的网站实现分享功能。
我遵循了https://developers.facebook.com/docs/javascript/quickstart/v2.4上的文档。
我们的代码如下:
我们的代码如下:
var link_url = 'http://example.com/some/link'; // Works fine
link_url = 'https://www.facebook.com/<our_fan_page>'; // DOES NOT WORK
$("#btnShare").click(function(event){
FB.ui({
method: 'share',
href: link_url,
}, function(response){
if(response && response.post_id){
alert("Thanks for sharing");
}else{
alert("Oop!");
}
});
});
对于一些链接,比如http://example.com/some/link,它运行良好。
问题是: 对于我们的FB页面链接(例如,https://www.facebook.com/[our_page_name]),它无法正常工作。
当点击“分享”按钮时,FB通常会显示一个对话框。但是当我尝试通过点击“发布到Facebook”按钮时,它会显示错误信息。
Sorry, this feature isn't available right now: An error occurred while processing this request. Please try again later.
有人遇到同样的问题吗?该如何解决?