Reputation: 131
I need a help to facebook share image link using node.js fb api.
var attachment = {
message: 'test message',
picture : 'http://localhost:1337/images/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);
}
});
the above code,working but, image display in empty. I want to image clickable. user click image redirect my page.
plz anyone help me.
Thanks.
Upvotes: 1
Views: 712
Reputation: 13702
You cannot share image from localhost:#port
, since fb has no access to it. Only images with public access can be used by a facebook post.
Upvotes: 1