Expand your player base with socially driven, organic engagement. Sharing for Gaming enables game content to be shared broadly across Facebook and Instagram.
Sharing for Gaming surfaces your game content for sharing among players and their Facebook friends. Users can share screenshots and video clips of their gameplay to Instagram and Facebook, including Stories and Facebook Groups, which helps players build meaningful communities around the games they play.
Sharing for Gaming is part of the suite of Gaming Services. Your application needs to enroll in Gaming Services to access features in this document. Follow the instructions to enroll your application.
When a user is presented with the Share dialog, one or more of the following options will be available depending on what they have installed:
Share to Your Feed
Share to Your Story
Share to Your Feed
Share to Your Story
The full share flow is:
We rely on your platform Settings > Basic > iOS/Android package settings and Deep Linking to enable switching back to your App. Make sure the Deep Linking option is enabled and that each relevant store and bundle is correctly configured per platform.
Please note that app switching is currently only available for shares on the Facebook App.
We recommend using the latest Facebook SDK, which supports Facebook Login for Gaming and Sharing for Gaming. It also ensures user can see the Share Experience after uploading. Follow the sample code below:
You can also choose to build your own sharing flow using the following APIs and methods to upload and perform an app switch from your app:
Follow the instructions on the Facebook Photo Uploading page. Keep in mind:
For Video, uploading instructions and examples can be found in the Facebook Video Upload Graph API docs.
This would not show Sharing Experience automatically.
// 1. Uploading photo with URL curl -i -X POST \ > -d "url=https://www.facebook.com/images/fb_icon_325x325.png" \ > -d "caption=test photo upload" \ > -d "access_token=%ACCESS_TOKEN%" \ > "https://graph.facebook.com/v7.0/me/photos"
// 2. Uploading photo with local file $ curl -X POST \ > "https://graph.facebook.com/v7.0/me/photos" \ > -F "source=@/path/to/picture.png" \ > -F "access_token=$ACCESS_TOKEN" \ > -F "caption='test_photo_upload'"
An example of a successful photo upload will receive a response like this:
{"id": "10153677042736789"}
You can use a provided deep link to allow the user to quickly navigate to the Media Library after an upload is completed in-app. If you are using SDK function call to upload the image, then this step is not needed.
The URL for the deep link is:
https://fb.gg/me/media_asset/{id}
Value of {id} | Description | Deep Link Behavior |
---|---|---|
returned_id | The identifier returned after the API asset upload step above. | Opens Facebook App with the targeted uploaded media and its sharing destination |
app_id | The app_id of the uploaded media | Opens Facebook App with a full list of user's current uploaded media. |
To building a synchronous share flow for image sharing:
/me/photos
APIBoth of these steps are covered above.