分享伙伴返回关于Facebook
Add a link or button to your site to make it easier for your content to be shared on Facebook. Copy and paste the following code blocks into your site and replace <url> with the link you want to Share.
只能链接
链接和图像
给连接和图片创建样式
如何才能确保Share Preview正常工作?确定预览作品(适用于高级合作伙伴)
当您在它,你也应考虑的时间,以确保Facebook的始终得到一个正确的预览您的网页,当用户尝试,分享
链接我们正在为您提供通过对网址的网页,以我们的服务器,这反过来看某些HTML标记。这些标签是用来显示预览该网页。在以提供此预览,我们一直寻求的网页的标题,摘要的主要内容,以及一个形象。如果有媒体的网页内容,这些媒体文件也很重要,以查明。
基本标签
为了确定预览通常正常转移,你应在你的html下添加标签。一个新闻动态例子展示如下:
<meta name="description" content="John Smith claims beautiful football is the main legacy of Akhil Wable's decade at the club. " />
<link rel="image_src" href="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" />
如你所见,title内包含标题预览,description内包含摘要预览,而image_src包含了图片预览。请确定任何位置都不包含html标记,因为这些标记将会被剥离。出于一致性考虑,请使用标记用来预览的文本数据,使用标记资源URL。
进行预览时至少应有标题和摘要标签内容,请确认以上两项均已包含。
媒介类型标签
您也可以使用如下标签来明确分享的内容的种类:
medium_type 的有效值为“音频”,“图像”,“视频”,“新闻”,“博客”和“多媒体”。
多媒体标签
The ideal way for you to connect video and media files to the share link is to make the URL in the link point to an html page that contains the <meta>/<link> tags described above (title, description, image_src) along with some additional <meta>/<link> tags:
声音(必需)
<meta name="description" content="audio_description" />
<link rel="image_src" href="audio_image_src url (eg. album art)" />
<link rel="audio_src" href="audio_src url" />
<meta name="audio_type" content="Content-Type header field" />
音频 (可选)
<meta name="audio_artist" content="audio_artist_name" />
<meta name="audio_album" content="audio_album_name" />
视频*(必须)
<meta name="description" content="video_description" />
<link rel="image_src" href="video_screenshot_image_src url" />
<link rel="video_src" href="video_src url"/>*
<meta name="video_height" content="video_height" />
<meta name="video_width" content="video_width" />
<meta name="video_type" content="Content-Type header field" />
视频(例子)
这是一个内嵌Flash视频的例子:
对于那段视频,适当的描述元应该像这样:
<meta name="video_height" content="200" />
<meta name="video_width" content="300" />
<meta name="video_type" content="application/x-shockwave-flash" />
你也能使用这些录像标签适合其他多媒体内容如果你这些标签完全描述你想要共享的满足。 如果你把这些标签用于除了录像以外其他事情,以设置正确的媒体类型。
要将你的视频嵌入Facebook,请向 developers-help@facebook.com 发送请求,请求中要包含你要使用的视频源的URL值的域名(在视频链接的标签上方),你必须保证你的视频能够正常播放。