We want all websites-- and in particular news sites, magazines, blogs, and other media sites-- to easily reach their existing fans and grow their fan base. Follow these best practices to give people the most engaging Facebook experience.
For Mobile Apps
We also want to help mobile app developers make it easy for their users to become their advocates. Building app experiences that people understand and trust is key to successfully using Facebook Sharing. Below are some best practice we highly recommend you follow:
Facebook Insights provides developers and site owners with metrics about their content. You can view the reach of particular stories, track creation and consumption of pieces of content, and view demographics of who is sharing and engaging with your content. By understanding and analyzing these trends, you'll be better equipped to improve your site and create the best sharing experiences for your users.
This data is available online and through an API for developers. Learn how to claim your domain and start tracking in our Insights guide.
Some plugins also have a
ref parameter which can be used to track traffic generation on your site. If a friend clicks on a story about someone liking one of your pages, we'll pass the
ref parameter back to your site, where you can track it with your own analytics software. See the parameters for social plugins for more info.
The Facebook Crawler fetches content from your site and generates a preview for people on Facebook. When someone shares a URL on Facebook and Likes or Recommends a page on your site using a plugin, it activates the Facebook Crawler. If your content is publicly available, we should have no problem accessing it.
You can learn more about how to make sure the Facebook Crawler can access your site in the Facebook Crawler Guide.
When someone shares content from your site to Facebook, our crawler will scrape the HTML of the URL that is shared. On a regular HTML page this content is basic and may be incorrect, because the scraper has to guess which content is important, and which is not.
Take control of what the Facebook crawler picks up from each page by using Open Graph meta tags. These tags provide structured info about the page such as the title, description, preview image, and more.
A clear title without branding or mentioning the domain itself.
A URL with no session id or extraneous parameters. All shares on Facebook will use this as the identifying URL for this article.
A clear description, at least two sentences long.
A Facebook App ID that identifies your website to Facebook.
The type of object:
This article has some translations:
This article has an author and a publisher:
The title should not have branding or extraneous information.
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.
This is a generic description that will not entice users to click.
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.
Don’t forget the
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. Images can be up to 8MB in size.
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.
The minimum image size is 200 x 200 pixels. If you try to use an image smaller than this you will see an error in the Sharing Debugger.
There are two different image sizes to use for game apps:
Read more about Open Graph for Games.
When content is shared for the first time, the Facebook crawler will scrape and cache the metadata from the URL shared. The crawler has to see an image at least once before it can be rendered. This means that the first person who shares a piece of content won't see a rendered image:
There are two ways to avoid this and have images render on the first Like or Share action:
Run the URL through the URL debugger to pre-fetch metadata for the page. You should also do this if you update the image for a piece of content.
og:image:heightOpen Graph tags
Using these tags will specify the image dimensions to the crawler so that it can render the image immediately without having to asynchronously download and process it.
Getting your meta-tags and social plugins correct can take a bit of tweaking, so we provide a debug tool to let you test how your pages are viewed by our scraper. Just enter your page URL, and you'll get a page of useful information, such as the meta-tags that are being picked up from your page and any errors or warnings with your content that might affect social plugins.
The debug tool also refreshes any scraped content we have for your pages, so it can be useful if you need to update them more often than the standard 24 hour update period.
Follow lets content creators share public updates with their followers, while saving personal updates for friends only. For example, journalists can allow readers or viewers to follow their public content, like photos taken on location or links to published articles. Follow is a simple, effective way for your audience to connect with you and keep up with your content, without adding you as a friend.
FB.Event.subscribe reference guide will show you how to track these events.
Let your users be your advocates by making it easy for them to tell their friends about your app using Facebook Sharing.
Building app experiences that people understand and trust is key to successfully using Facebook Sharing. For people using your app, sharing helps them communicate with their friends about what's important to them and enhances their experience in your app. For you as a developer, sharing increases awareness of your app through impressions in the Facebook newsfeed and, when people engage with the content posted from your app, it can send people to your app or your app's App Store page, driving traffic and app installs.
There are four ways to allow your users to Share on mobile:
Apps that follow these best practices help people feel comfortable about sharing and thus helps to create a win-win scenario for both developers and users.
The following are best practices that we highly recommend you follow:
One of the most interesting aspects of sharing to Facebook from your app is that when people engage with the news feed stories posted from your app, those stories can send people to your app or your app's App Store page, driving traffic and app installs. You can implement this behavior using App Links. App Links is a standard that makes it possible to deep link to content in your app. When someone using your app shares content via Facebook (or another App Links-enabled app) you can create a link that makes it possible to jump back into your app into that piece of content.
Message Dialog allows people to explicitly share stories with content from your app in a more personal way to a more specific, limited audience using Facebook Messenger. App Links seamlessly transits to the right location in your app.
Facebook Analytics provides developers and Page owners with metrics about their content. By understanding and analyzing trends about usage and demographics as well as consumption and creation of content, you can be better equipped to improve your business and create better experiences on Facebook. Visit Facebook Analytics to read more.
You may want to track mobile referral traffic to your website from Facebook on iOS or Android. This is especially common when people share links to your site to Newfeed and their contacts click on these links on mobile. Your app should:
Watch for an HTTP Referer header with a value including
See if referral traffic originates from Facebook on iOS, Android, or on a mobile web browser on these channels. Check for a
HTTP User-Agent with the value
FB_IAB/FB4A for Android and
FBAN/FBIOS for iOS.