0
我正在使用Facebook的SDK与Require JS和Backbone JS。我有一个共享按钮,触发fb共享显示。它按预期显示,,但不提供分享消息的选项。出现所有其他选项(时间轴,组,事件,页面)。为什么有这个原因?FB网络共享对话框没有给出作为消息发送的选项
我的Facebook SDK加载模块(复制/从FB开发人员指南生成):
define(["facebook"], function(FB){
FB.init({
appId : '', // my id is here
xfbml : true,
version : 'v2.9'
});
FB.AppEvents.logPageView();
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
});
,我如何使用它的骨干观点:
clickFbShareHandler: function() {
var dialogue = "I got " + this.model.getValue()";
FB.ui({
method: 'share',
mobile_iframe: true,
href: '(my url)',
quote: dialogue,
}, function(response){});
}
here is an image of the options given to me:
我在前面查看时看到了这个,但为什么我问的问题是当我在分享时说一个buzzfeed文章,所有选项都出现了。另外,它说共享对话框应该给出一个在开发者文档中作为消息发送的选项。它表示发送对话框只能用于通常通过电子邮件发送的内容。 我不想实现两个按钮,当一个应该都做。 https://developers.facebook.com/docs/sharing/reference/share-dialog – vapurrmaid
好的,那么它不是fb.ui共享,但sharer.php。请参阅我的答案中的更新 – luschn