如何让 facebook 识别我的网页图片
我开发了一个网站 但是当我分享任何页面时 在 facebook 中
facebook 应该能识别我的页面 并选择图像来选择缩略图
,但这不会发生在我的网站上 就好像 Facebook 无法识别我的页面
或无法读取它并从中选择图像 一样 我应该怎么做
才能让 Facebook 识别我的页面 并将页面中的所有图像加载到 左右导航以选择共享页面的缩略图
i developed a website
ut when i share any page
in facebook
facebook should recognize my page
and select images to select a thumbnail
but this do not happen in my website
as if facebook can not recognize my page
or cannot read it and select images from it
what should i do
to let facebook recognize my page
and load all images in the page to
navigate left and right to select a thumb for the shared page
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来问题已经得到解答 这里。这是另一个有用的链接。谢谢你的询问。它让我找到了一些我可以使用的东西。
更新:尝试后发现它不起作用,我尝试了 this< 中的方法/a> 帖子。它最初不起作用,但那是因为我忘记上传图像。因此,原来的方法可能仍然有效。这是我在 head 部分使用的模板:
更新 2:如果 Facebook 似乎无法识别您的代码,请尝试他们的 lint 工具。这有两件事。最明显的一点是它会报告代码中的任何错误。第二个是它刷新 Facebook 的页面缓存。在我执行此操作之前,我有两个页面无法识别新代码。
Looks like the question has already been answered here. Here is another useful link. Thanks for asking. It made me find out something I can use.
Update: After trying it and finding it not to work I tried the method in this post. It initially didn't work, but that was because I forgot to upload the image. So it may be the case that the original method may still work. Here's the template I used in my head section:
Update 2: If it seems that Facebook isn't recognizing your code, try their lint tool. This does two things. The obvious one is that it reports any errors in your code. The second is that it refreshes Facebook's cache of the page. I had two pages where the new code wasn't recognized until I did this.
根据我自己的测试,Facebook 应该可以毫无问题地在您的网站上找到图像,只要它们直接出现在 html 中(如
1)而不是通过CSS(
background-image: url(path/to/img.png);
)。这是我自己的站点测试,位于:http://davidrhysthomas.co.uk/so/fbookImg.html,诚然,这没有“共享此页面”按钮,因此要求您首先登录 Facebook,这可能会有所不同。但不幸的是,我没有 Facebook 开发者帐户来测试这个理论。
From my own tests, Facebook should find images on your site with no problem, so long as they appear directly in the html (as
<img src="path/to/img.png" />
1) and not via css (background-image: url(path/to/img.png);
).This is my own-site test, at: http://davidrhysthomas.co.uk/so/fbookImg.html, admittedly this doesn't have a 'share this page' button, so requires you to log into Facebook first, which might make a difference. But I don't have a Facebook developer account with which to test that theory, unfortunately.
根据我使用 drupal 站点的经验,该徽标无法识别,因为 drupal 系统呈现相对路径。将其更改为带有 http:// 的完整路径并刷新 FB 的缓存应该可以工作
from my experience using a drupal site the logo was not recognized because the drupal system renders a relative path. changing this to a full path with http:// and refreshing FB's cache should work