FB.ui 提要对话框被“忽略”图片属性,使用缓存的 og:image 标签代替
这是我的 FB.ui 代码:
FB.ui({
method: 'feed',
message: '',
link: 'http://mywebaddress/pathToContent',
picture: 'http://mywebaddress/pathToPhoto/photo.jpg',
display: 'popup'
});
对话框完美弹出,它有链接,所以没问题......但图片不显示。
我已验证图片 URL 正确。然后我使用调试器来测试内容 URL 的开放图标签:它运行完美。
显然,调试器清除了某种缓存。在链接上使用调试器后,FB.ui
对话框可以正常显示图片。
我能做点什么吗?用户从我的网站分享到 Facebook 的内容没有像应有的那样显示图片,这让他们使用起来有点烦人(这从来都不是一件好事!)
谢谢!
Here's my FB.ui code:
FB.ui({
method: 'feed',
message: '',
link: 'http://mywebaddress/pathToContent',
picture: 'http://mywebaddress/pathToPhoto/photo.jpg',
display: 'popup'
});
The dialog pops up perfectly, it has the link so no problem... but the picture doesn't show.
I have verified the picture URL is correct. Then I have used the Debugger to test the content URL's open graph tags: it runs flawlessly.
Apparently, the debugger clears some sort of caching. After I use the debugger on the link, the FB.ui
dialog shows the picture just fine.
Is there something I can do about this? The content that users are sharing from my site to Facebook isn't showing the picture like it should, making it a bit annoying for them to use (which is never a good thing!)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要更改共享网址源中的
og:image
。picture
参数已弃用:https: //developers.facebook.com/docs/sharing/reference/feed-dialog/#responseYou need to change the
og:image
in the source of the shared url instead. Thepicture
parameter is deprecated: https://developers.facebook.com/docs/sharing/reference/feed-dialog/#response问题是你没有设置图片的 URL。
The problem is that you didn't set the URL of your image.