Share Button

The Share button lets people add a personalized message to links before sharing on their timeline, in groups, or to their friends via a Facebook Message. If your app is native to iOS or Android, we recommend that you use the native Share Dialog on iOS and Share Dialog on Android instead.
This new Share Button works with a new version of our web-based Share Dialog. When using the sharer.php method of invoking the Share Dialog, this dialog will also display the new version without any changes required.
URL to share
Width
Layout

Settings

SettingHTML5 AttributeDescriptionDefault
hrefdata-hrefThe absolute URL of the page that will be shared.XFBML and HTML5 versions default to the current URL.
layoutdata-typeSelects one of the different layouts that are available for the plugin. Can be one of "box_count", "button_count", "button", or "icon".button_count
widthdata-widthThe width of the plugin. The layout you choose affects whether the width value will have any effect.Depends on layout

FAQ

How do I customize what is shared by this plugin?

If you plan to use the Share button on your website, you should read our best practices guide to ensure published stories look great on Facebook and get the best possible distribution.

Can I use the Share Dialog without using the Share Button?

Yes, although we recommend using the Share button to offer the simplest and most consistent experience for people using your site, you can invoke the Share Dialog using a link:
<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank">
 Share on Facebook
</a>

What makes up the number shown next to my Share button?

The number shown is the sum of:
  • The number of likes of your URL
  • The number of shares of your URL (this includes copy/pasting a link back to Facebook)
  • The number of likes and comments on stories on Facebook about your URL

Why and when does Facebook scrape my page?

Facebook needs to scrape your page to know how to display it around the site. This happens every 24 hours to ensure the properties are up to date. The page is also scraped when the URL is entered into the Debugger Tool.
Facebook observes cache headers on your URLs - it will look at "Expires" and "Cache-Control" in order of preference. However, even if you specify a longer time, Facebook will scrape your page every 24 hours.
In some cases you may want to serve a different version of a page to our scraper (containing more Open Graph metadata) than you do to people who are viewing the page. In this case you can target the browser agent used by the scraper:
"facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"