Sharing on Facebook

New! Stories makes sharing fun and simple – let people share your app or site content in the moment across platforms.

Read Docs
Something Went Wrong
We're having trouble playing this video.
An example of sharing across platforms from Facebook for Developers

Enable sharing across platforms

Facebook and Instagram share extensions make sharing your content fun and simple on both Feed and Stories.

Tap into the power of Stories

Leverage the power of Stories, so people can share highlights throughout their day without missing a moment.

An example of sharing to Stories on Facebook from Facebook for Developers
An example of sharing with Spotify to Instagram Stories from Facebook for Developers
An example of Spotify integration with Instagram Stories from Facebook for Developers

Get up and running with Sharing

Add Sharing to your app or site – it's easy to get started. Simply copy and paste a piece of code into your app or site.

          // setup for new implicit intent 
          public static final int FACEBOOK_ADD_STICKER_TO_STORY_REQUEST = 10;
          public static final String FACEBOOK_SHARE_STICKER_INTENT = "com.facebook.share.ADD_STICKER_TO_STORY";

          // proposal on firing the implicit share intent
          Intent intent = new Intent(FACEBOOK_SHARE_STICKER_INTENT);
          intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
          intent.setDataAndType(fileUri, "image/*");
          intent.putExtra("content_url", contentUrl);
          intent.putExtra("top_background_color", topColor);
          intent.putExtra("bottom_background_color", bottomBackgroundColor);
          if (activity.getPackageManager().resolveActivity(intent, 0) != null) {
          activity.startActivityForResult(intent, FACEBOOK_ADD_STICKER_TO_STORY_REQUEST);
          }
        

Facebook Android

          Intent intent = new Intent(INSTAGRAM_SHARE_TO_STORY);
          intent.setType(MEDIA_TYPE_JPEG);
          intent.putExtra(INTERACTIVE_ASSET_URI, interactiveAssetUri);
          intent.putExtra(STICKER_SHARE_CONTENT_URL, STICKER_SHARE_DEMO_URL);
          intent.putExtra(INTERACTIVE_TOP_BG_COLOR, "#33FF33");
          intent.putExtra(INTERACTIVE_BOTTOM_BG_COLOR, "#FF00FF");
          Activity activity = getActivity();
          activity.grantUriPermission(
          INSTAGRAM_NAMESPACE, interactiveAssetUri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
          if (activity.getPackageManager().resolveActivity(intent, 0) != null) {
          activity.startActivityForResult(intent, 0);
          }
        

Instagram Android

Hashtag Sharing: Start a conversation

Give people the power to come together around topics that interest them.

An example of hashtag sharing on Facebook from Facebook for Developers

Sharing Debugger: Share better

Easily view and manage how your content looks when it's shared anywhere on Facebook.

Docs
An example of sharing via Facebook Messenger from Facebook for Developers

Send via Messenger

Let people directly send content to one or more friends on Messenger with a simple Messenger branded button, or launch the Messenger app's composer with your own button.