当在Facebook上共享某些链接时(以编程方式或手动方式),该帖子中将显示javascript代码。
因此,我的问题与如何修复我的网站更相关,因此,在发布指向Facebook的链接时,javascript代码不会显示在facebook帖子中。
例如,尝试发布此链接:http : //djuice.com.pk/discounts
您会在Facebook帖子中看到javascript代码(位于共享页面上)。
您应该设置description
共享参数。例如:
FB.ui(
{
method: 'feed',
name: 'The Facebook SDK for Javascript',
caption: 'Bringing Facebook to the desktop and mobile web',
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: 'https://developers.facebook.com/docs/reference/javascript/',
picture: 'http://www.fbrell.com/public/f8.jpg'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句