If you have ever wondered how you selected specific images or specific copy to add to facebook when a user shares your page on Facebook, there are some simple meta tags you can add to your html to make sure that your site/brand is being properly represented on the site…
Making Sure the Preview Works (For Advanced Partners)
While you’re at it, you should also take the time to make sure that Facebook always gets a correct preview of your page when users try to share it.
The link we’re providing you with passes on the URL of your page to our servers, which in turn look up certain html tags within it. Those tags are used to display a preview of the page. In order to provide this preview, we always look for the title of the page, a summary of the main content, and an image. If there’s media content on the page, those media files are also important to identify.
Basic Tags
In order to make sure that the preview is always correctly populated, you should add the tags shown below to your html. An example news story could have the following:
<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” />
As shown, title contains the preview title, description contains the preview summary and image_src contains the preview image. Please make sure that none of the content fields contain any html markup because it will be stripped out. For consistency’s sake, please use the <meta> tag to provide text data for the preview, and the <link> tag for any source urls.
The title and summary tags are the minimum requirements for any preview, so make sure to include these two.
Medium Type Tag
You may also specify the type of content being shared by using the following tag:
Valid values for medium_type are “audio”, “image”, “video”, “news”, “blog” and “mult”.
Multimedia Tags
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:
Audio (required)
<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” />
Audio (optional)
<meta name=”audio_artist” content=”audio_artist_name” />
<meta name=”audio_album” content=”audio_album_name” />
Video* (required)
<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” />
Video (example)
Here is an example Flash Video embed:
For that video, the appropriate metadata would look like this:
<meta name=”video_height” content=”200″ />
<meta name=”video_width” content=”300″ />
<meta name=”video_type” content=”application/x-shockwave-flash” />
You can use these video tags for other multimedia content too if these tags fully describe the content you want to make sharable. Be sure to use the Medium Type Tag described above to set the correct medium type if you use these tags for something other than video.
* To make your videos embeddable on Facebook, please send a request to developers-help@facebook.com. This request should include the domain names of the values you will use for the video source URL (in the video_src link tag above). You must do this to ensure your videos play correctly.
http://www.facebook.com/share_partners.php
Share this on google buzz!