我正在使用 Facebook javascript 发布/发布到用户墙。下面是我的代码。每次用户在墙上发帖时,他们都会看到如下所示的屏幕。问题是我在标题文本“Pandora-whichstar are you”之后的标题中得到“www.facebook.com”。知道如何永久删除它或将其更改为更方便的东西吗?
图片
编码
/facebook: post to wall
function publishWallPost() {
var fbImg = $('.head .headerLeft p img')[0].src;
var fbTxt = $('.head .headRight span.artistName').text();
FB.ui({
method: 'feed',
name: 'Pandora - Which Star Are You',
caption: 'Convenient caption text here?',
description: 'I\'m ' + fbTxt + ' according to Pandora\'s Which Star Are You competition.\n Click on the title to find out which star you are!',
link: 'https://www.facebook.com/pages/xxx/11111111111?sk=app_2222222222',
picture: fbImg
},
function (response) {
console.log('publishStory response: ', response);
});
return false;
}
window.fbAsyncInit = function () {
FB.init({
appId: '2222222222',
status: true,
cookie: true,
xfbml: true
});
};
(function () {
var e = document.createElement('script');
e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());