online job

Friday 18 April 2014

Sharing Best Practices

Sharing Best Practices

User agent whitelisting

Your engineers can allow the following user-agent access to pages that would otherwise be inaccessible to the public. We rarely update these user-agents, and users can spoof them. But since only a very small percentage of users know how to change their browserメs user-agent, the expected number of users who would exploit this is very low. Additionally, you also do not need to include all the URL's regular content to our crawler, just a valid HTML document with the appropriate meta tags.

Facebookメs Crawler crawls with facebookexternalhit/<version_number>, where <version_number> is either 1.0 or 1.1, as of March 2013.

facebookexternalhit/1.0
facebookexternalhit/1.1
Crawler rate limiting

You can label pages and objects to change how long Facebook's crawler will wait to check them for new content. Use the og:ttl object property to limit crawler access if our crawler is being too aggressive.

3. Use proper Open Graph tags

Open Graph tags are included in your pageメs HTML and allow the Facebook Crawler to generate previews when your content is shared on Facebook.

We give examples below, but the basic Open Graph tags you should implement are:

og:title ヨ The title of your article, excluding any branding.
og:site_name - The name of your website. Not the URL, but the name. (i.e. "IMDb" not "imdb.com".)
og:url ヨ This URL serves as the unique identifier for your post. It should match your canonical URL used for SEO, and it should not include any session variables, user identifying parameters, or counters. If you use this improperly, likes and shares will not be aggregated for this URL and will be spread across all of the variations of the URL.
og:description ヨ A detailed description of the piece of content, usually between 2 and 4 sentences. This tag is technically optional, but can improve the rate at which links are read and shared.
og:image ヨ This is an image associated with your media. We suggest that you use an image of at least 1200x630 pixels.
fb:app_id ヨ The unique ID that lets Facebook know the identity of your site. This is crucial for Facebook Insights to work properly. Please see our Insights documentation to learn more.
In addition, you might consider implementing some other types to improve distribution and engagement:

og:type - Different types of media will change how your content shows up in Facebook's newsfeed. There are a number of different common object types already defined. If you don't specify a type, the default will be website. You can also specify your own types via Open Graph.
og:locale - The locale of the resource. The default is en_US. You can also use the og:locale:alternate to reflect that you have other available language translations available as well. See our Internationalization and Open Graph Internationalization pages for examples and information.
article:author - This property links to the authors of the article. The target of this can be either a Facebook Profile or a Facebook Page and Facebook will likely offer a chance to follow that author when it's displayed in the news feed. (Note that your authors should have follow enabled so that people can follow them.)
article:publisher - This property links to the publisher of the article. The target of this property must be a Facebook Page. When displayed in the News Feed, Facebook may offer the ability to like the publisher. Note that this tag is only available to media publishers.
Example 1: GOOD

A clear title without branding or mentioning the domain itself.

<meta property="og:title"
content="Workday Sets Price Range for I.P.O." />
A site name:

<meta property="og:site_name" content="My Favorite News"/>
A URL with no session id or extraneous parameters. All shares on Facebook will use this as the identifying URL for this article.

<meta property="og:url"
content="http://www.myfavnews.com/2013/1/1/workday-price-range" />
A clear description, at least two sentences long.

<meta property="og:description" content="Workday, a provider of cloud-based
applications for human resources, said on Monday that it would seek to price
its initial public offering at $21 to $24 a share.  At the midpoint of that
range, the offering would value the company at $3.6 billion. Like many other
technology start-ups, Workday, founded in 2005, will have a dual-class share
structure, with each Class B share having 10 votes. Its co-chief executives,
David Duffield, the founder of PeopleSoft, and Aneel Bhusri, who was chief
strategist at PeopleSoft, will have 67 percent of the voting rights after
the I.P.O., according to the prospectus." />
Unique ID that identifies your domain to Facebook.

<meta property="fb:app_id" content="[FB_APP_ID]" />
The type of object:

<meta property="og:type" content="article" />
This article has some translations:

<meta property="og:locale" content="en_US" />            <!-- Default -->
<meta property="og:locale:alternate" content="fr_FR" />  <!-- French -->
<meta property="og:locale:alternate" content="it_IT" />  <!-- Italian -->
This article has an author and a publisher:

<meta property="article:author" content="https://www.facebook.com/fareedzakaria" />
<meta property="article:publisher" content="https://www.facebook.com/cnn" />
Example 2: BAD

The title should not have branding or extraneous information.

<meta property="og:title"
content="MyFavNews.com ヨ Business Section- Workday Sets Price Range for I.P.O." />
This URL has extraneous information that changes from user to user, resulting in likes/shares spread across multiple URLs, instead of being aggregated for all users sharing this article.

<meta property="og:url"
content="http://www.myfavnews.com/2013/1/1 /workday-price-range?user_id=1234" />
This is a generic description that will not entice users to click.

<meta property="og:description"
content="MyFavNews is the best source for your favorite news." />
This is a generic image that will look the same for all stories. It is only 100px by 100px, which will not be usable on higher resolution displays.

<meta property="og:image"
content="http://graphics.myfavnews.com/images/logo-100x100.jpg" />
Donメt forget the fb:app_id, article:author and article:publisher tags!

4. Optimize your image sizes to generate great previews

Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images that are 600 x 315 pixels to display link page posts with larger images.


If your image is smaller than 600 x 315 px, it will still display in the link page post, but the size will be much smaller.


We've also redesigned link page posts so that the aspect ratio for images is the same across desktop and mobile News Feed. Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping.

Game Apps

Images for game app stories appear in a square format. Image ratios for these apps should be 600 x 600 px. Read more about Open Graph for Games.

No comments: