gpt4 book ai didi

node.js - Fb api发布共享图像链接显示空图像

转载 作者:太空宇宙 更新时间:2023-11-04 01:06:23 25 4
gpt4 key购买 nike

我需要帮助才能使用 node.js fb api 在 facebook 上共享图像链接。

      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);
}

});

上面的代码可以工作,但是图像显示为空。 我想要可点击的图像。用户单击图像重定向我的页面。

请任何人帮助我。

谢谢。

最佳答案

您无法从 localhost:#port 共享图像,因为 fb 无权访问该图像。 Facebook 帖子只能使用具有公共(public)访问权限的图像。

关于node.js - Fb api发布共享图像链接显示空图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22600554/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com