API reference
API reference
Select your platform
No SDKs available
No versions available

Media Class

The media API provides a convenient and seamless way to share local media files, such as photos (currently the only supported type), directly to Facebook from within your application. This allows users to easily share their favorite moments and memories with their friends and family on the world's largest social media platform. With just a few simple steps, you can enable your users to share their media files to Facebook, making it easy for them to spread the word about your app and increase its visibility. The payload returned for the sharing result is defined as com.meta.horizon.platform.ovr.models.ShareMediaResult.

Static Member Functions

Launch the Share to Facebook modal, allowing users to share local media files to Facebook. Accepts a postTextSuggestion string for the default text of the Facebook post. Requires a filePath string as the path to the image to be shared to Facebook. This image should be located in your app's internal storage directory. Requires a contentType indicating the type of media to be shared (only 'photo' is currently supported). The payload for the result is defined as com.meta.horizon.platform.ovr.models.ShareMediaResult.
Parameters
postTextSuggestion
- this text will prepopulate the facebook status text-input box within the share modal
filePath
- path to the file to be shared to facebook
contentType
- content type of the media to be shared
Did you find this page helpful?
Thumbs up icon
Thumbs down icon