After you integrate Facebook Login, Facebook Sharing, or Facebook Gaming, certain App Events are automatically logged and collected for Events Manager, unless you disable Automatic App Event Logging. We recommend all app developers using Facebook Login, Facebook Sharing, or Facebook Gaming to understand how this functionality works. For details about what information is collected and how to disable Automatic App Event Logging, see Automatic App Event Logging.
Sharing is a simple way of letting people bring content from your website or mobile app to Facebook. Sharing is triggered when someone clicks a social plugin like the Share or Send button. This launches the corresponding Share or Message dialog. You can also choose to design your own button to launch one of these dialogs.
This document describes:
Sharing on Facebook depends on a few core components:
URLs: In most cases, including sharing from mobile apps, your content is shared on Facebook as a link, whether it's an article, image, video, or something else
The Facebook Crawler: When someone shares your content, our crawler will scrape the page to render a preview on Facebook
Open Graph Tags: Adding Open Graph meta tags to the
<head> of your web page HTML will provide the crawler with structured info like a title, description, and thumbnail image for the content
Sharing Interfaces: There are a few different end-user experiences you can choose from to let people share from your website or app to Facebook. Here's an overview of how it works:
|Button Trigger||Sharing Interface Launched||Publishing Behavior|
Web: Share dialog
Mobile: Fast-app switch to native Share dialog
Appears in Timeline and Activity Log.
May appear in Feed.
Web: Message dialog
Mobile: Fast-app switch to native Message dialog
Sent as a Facebook message
Follows the publishing behavior of the Share dialog.
People can share the following kinds of content to Facebook:
Links - Most content is a URL which references an HTML page. To provide the most relevant information, you should mark up your page with Facebook-specific meta tags. See A Guide to Sharing for Webmasters.
Photos - Directly upload one or more user-generated photos.
Videos - Directly upload a user-generated video.
Multimedia - Directly upload a combination of photos and videos.
Open Graph Stories - Use Open Graph actions and objects to create rich stories through a strongly-typed API.
You can link back to your app from the content people share in Feed. App Links launch your app from shared content. You can even link to a specific context within your app.
You can associate a hashtag with a shared link, photo, or video.
We want to make it as easy and as flexible as possible for people to share content from your app with the audience they want. With these options, you can first choose the sharing experience for people using your app, and then choose an implementation method.
When you want the simplest sharing integration with Facebook, you should use buttons that trigger our dialogs. The Facebook SDKs provide buttons that you can use. None of these options requires you to implement Facebook Login.
You can use Social Plugins such as the Like, Share and Send buttons. These are available for desktop and mobile web.
You can also create your own custom button to trigger a Like, Share, or Send, across all platforms.
When you use native Facebook dialogs you can enable sharing without adding Facebook Login. Like our native buttons, they offer out-of-the-box implementation.
The Share Dialog is an easy way to let people share content without requiring them to log into your app or grant any permissions. It works on Web, Android, and iOS.
On mobile, when someone shares with the Share Dialog, the dialog makes a fast app-switch to the Facebook app on their device. We also have a web dialog as a fallback if someone doesn't have the native Facebook app installed.
Use the Message dialog to let people privately share content to Messenger. Like the Share dialog, it's a native sharing component that doesn't require you to implement Facebook Login.
The Message dialog enables people to share links, images and Open Graph stories. On mobile, someone must have the native Messenger app installed.
You can use Android implicit intents and iOS custom URL schemes to pass photos, videos, and stickers to the Facebook app. The Facebook app will receive this content and load it in the Story Composer so the User can publish it to their Facebook Stories.
It's important to mark up your website's HTML with Open Graph tags to manage how your content appears on Facebook. Without these tags, the Facebook crawler will do its best to identify content such as title, description, and image for your content.
Optimize your content for sharing to Facebook by adding Open Graph tags to the
<head> of your page's HTML. These tags describe the content shared. This includes content type such as image, video, or article and any additional attributes.
Learn about tags you should include with your content in Markup for Sharing.
If you move content to a new URL, the Likes, Shares, and Comments on that original URL won’t automatically migrate. To continue aggregating these actions at a new URL, you should point the Facebook crawler to the old page that represents the canonical URL for your content. Learn how in this doc for webmasters.