如何將我的網站內容分享到臉書?
我已經試過Sharer和Dialog,但是那些不顯示圖片。在臉書上分享帶有圖像的網站內容
我的代碼:
function facebook_share(){
FB.init({
appId : '1884730308422253',
status : true,
xfbml : true,
version : 'v2.8'
});
FB.ui({
method: 'feed',
name: 'Come Listen to this Song',
link: 'http://192.168.0.100/catchthemyoung/student',
picture: 'http://192.168.0.100/catchthem/images/timeline/EPUQuotgRj.png',
caption: 'mywebsite.com',
description: 'msg',
message: 'msg'
},
// callback
function(response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
}
);
}
該圖像需要公開可用,以便Facebook可以請求並存儲它。 'http:// 192.168.0.100 /'不可公開訪問。 – CBroe