在我的PHP代码中使用下面的代码来共享数据:
<a id="fbshare" class="fbshare" href="#" onclick="fbshare()" name="fb_share" share_url="<?=$dataLink"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
我希望回复/事件回到页面。
任何有用的帮助...... !!!
答案 0 :(得分:1)
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
message: 'Facebook Dialogs are easy!'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
我想你在你的fbshare函数中调用FB.ui方法,你可以添加一个函数来获取响应,这里是一个示例代码。