Facebook Sharing SDK is a user friendly tools for sharing photos, videos and links easily through your app. User can share the media as a news feed or Story to Facebook app or as a direct message to a friend in Messenger app.
The sharing code is short and simple. The following is a set of code for sharing an image as a direct message to a friend through Messenger app. It is only 10 lines long!
// Same as previous session
let image = UIImage(named: "AppIcon")!
let photo = SharePhoto(image: image, userGenerated: true)
let photoContent = SharePhotoContent()
photoContent.photos = [photo]
photoContent.hashtag = Hashtag("#fooHashTag")
// Show as a message dialog -> Messenger App
let messageDialog = MessageDialog(content: photoContent, delegate: self)
messageDialog.show()
However, there are some limitations on each shared media (file size & maximum number of file) and tricks on providing better UI/UX. They will all be covered in this article.
#marketing #app-development #facebook-messenger #swift