Facebook发布链接图片 [英] Facebook Post Link Image

查看:417
本文介绍了Facebook发布链接图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当有人在Facebook上张贴链接时,脚本通常会扫描该链接的任何图像,并在帖子旁边显示一个快速缩略图。对于某些URL(包括我的),FB似乎没有拾取任何东西,尽管它是该页面上的许多图像。



我读过,FB喜欢用户希望指定的图像的image_src标签,但是这不会为我的网站生成该缩略图。



我的网址直接转到DNS,不转发,所以我不会想象也可能是问题。



有没有人想到为什么FB不能从我的网站生成任何缩略图?

解决方案

最简单的方法只是一个链接标签:

  link rel =image_srchref =http://stackoverflow.com/images/logo.gif/> 

但还有其他一些您可以添加到您的网站,使其更多社交媒体友好: / p>

打开图表标签



Open Graph标签是添加到< head> 来描述您的网页代表的实体,无论是乐队,餐厅,博客或其他内容。



一个Open Graph标签如下所示:

 < meta property = og:tag namecontent =tag value/> 

如果您使用Open Graph标签,需要以下六个:




  • og:title - 实体的标题。

  • og:type - 实体的类型。您必须从打开图表类型列表中选择一种类型。

  • og:image - 表示实体的图像的URL 。图像必须至少为50像素乘50像素。方形图像效果最佳,但您可以使用高达三倍的图像。

  • og:url - 表示实体的页面的规范的永久URL。当您使用Open Graph标签时,Like按钮将链接发送到 og:url 而不是Like按钮代码中的URL。

  • og:site_name - 您的网站的可读名称,例如IMDb。

  • fb:admins fb:app_id - 页面管理员的Facebook ID或Facebook平台应用程序ID的逗号分隔列表。至少只包括您自己的Facebook ID。



有关Open Graph标签的详细信息和有关管理您的页面的详细信息,请参见Open Graph协议文档。



http://developers.facebook.com/docs/reference/plugins/like


When someone posts a link on facebook, a script usually scans that link for any images, and displays a quick thumbnail next to the post. For certain URLs though (including mine), FB doesn't seem to pick up anything, despite their being a number of images on that page.

I read up that FB prefers the "image_src" rel tag for the image the user wishes to specify, but this does not generate that thumbnail either for my site.

My url goes directly to the DNS, and is not forwarded, so I don't imagine that could be the problem either.

Does anyone have an idea as to why FB can't generate any thumbnails from my site?

解决方案

The easiest way is just a link tag:

<link rel="image_src" href="http://stackoverflow.com/images/logo.gif" />

But there are some other things you can add to your site to make it more Social media friendly:

Open Graph Tags

Open Graph tags are tags that you add to the <head> of your website to describe the entity your page represents, whether it is a band, restaurant, blog, or something else.

An Open Graph tag looks like this:

<meta property="og:tag name" content="tag value"/> 

If you use Open Graph tags, the following six are required:

  • og:title - The title of the entity.
  • og:type - The type of entity. You must select a type from the list of Open Graph types.
  • og:image - The URL to an image that represents the entity. Images must be at least 50 pixels by 50 pixels. Square images work best, but you are allowed to use images up to three times as wide as they are tall.
  • og:url - The canonical, permanent URL of the page representing the entity. When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.
  • og:site_name - A human-readable name for your site, e.g., "IMDb".
  • fb:admins or fb:app_id - A comma-separated list of either the Facebook IDs of page administrators or a Facebook Platform application ID. At a minimum, include only your own Facebook ID.

More information on Open Graph tags and details on Administering your page can be found on the Open Graph protocol documentation.

http://developers.facebook.com/docs/reference/plugins/like

这篇关于Facebook发布链接图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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