有没有一种方法可以强迫Facebook在共享链接上显示og:image? [英] Is there a way to force Facebook to show the og:image on shared links?

查看:150
本文介绍了有没有一种方法可以强迫Facebook在共享链接上显示og:image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Facebook应用程序,当用户完成某些活动时,该应用程序会为用户生成自定义的可共享链接.可共享页面具有以下元标记:

We have a Facebook app that generates custom shareable links for users when they complete certain activities. The shareable pages have the following meta tags:

  <meta property="fb:admins" content="1000000000000000">
  <meta property="fb:app_id" content="1000000000000000">
  <meta property="og:site_name" content="ActivityApp">
  <meta property="og:title" content="I just completed this activity.">
  <meta property="og:description" content="Click here to see John's activity!">
  <meta property="og:type" content="website">
  <meta property="og:url" content="http://activity.com/abcd69478383951886c14ae">
  <meta property="og:image:type" content="image/png">
  <meta property="og:image:width" content="800">
  <meta property="og:image:height" content="420">
  <meta property="og:image" content="http://cdn.com/abcd69478383951886c14ae.png">
  <meta name="author" content="John">

大多数情况下,共享链接时,Facebook都会在Newsfeed上正确显示标题,描述和图像.但是有时,og:image和og:title会无缘无故被隐藏.看起来就是这样...

Most of the time, Facebook will correctly show the title, description, and image on the Newsfeed when the links are shared. But sometimes, the og:image and og:title will be hidden for no reason. This is what it looks like...

奇怪的是,当我们通过单击显示现有的抓取信息来检查调试器上的链接时,会说它已被正确抓取,并在底部显示标题,图像和描述.

The strange part is that when we check the link on the debugger by clicking Show existing scrape information it would say that it was correctly scraped and would display the title, image, and description at the bottom.

为什么会发生这种情况,我们该怎么做才能确保每次共享链接时都能正确显示它们?

Why does this happen, and what can we do to make sure that our links will display correctly every time they are shared?

其他信息:我们的应用程序生成了数百万个故事,因此我们无法手动对链接进行任何操作.

Additional info: our app generates millions of stories so we can't manually do anything to the links.

推荐答案

过去从事此工作的人们: https://developers.facebook.com/tools/debug/og/object/

People used to work on this: https://developers.facebook.com/tools/debug/og/object/

但是您也可以尝试以下操作: https://developers.facebook.com/tools/debug/sharing

But you can also try this: https://developers.facebook.com/tools/debug/sharing

如果您仍然无法在此处制作图片,则说明您的网站一定有问题.除非您可以提供指向您资源的实际链接,否则我将无法提供任何进一步的帮助.

If you still can't make the image there, then it must be something wrong with your website. Unless you can provide an actual link to your resource, I can't do any further help.

这篇关于有没有一种方法可以强迫Facebook在共享链接上显示og:image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆