1

I am using fb-messenger://compose to open Facebook Messenger Composer, but I need to attach a predefined link into the composer. I don't want to use action sheet for that. I also saw this answer -

Facebook Messenger Compose Predefined Message

Which may seem similar but is a wrong answer because it is Facebook SDK and not Facebook Messenger.

I looked at Facebook Messenger SDK for iOS -

https://developers.facebook.com/docs/messenger/ios

under Basic Integration \ Sharing Content

and all I could find is sharing images, animated gifs, videos, and audio clips. But on the other hand I saw that Pinterest are posting link to Messenger from their iOS app - so it is possible.

Any help will be appreciated

Update: I managed to open messenger on the compose message using:

fb://messaging/new

still cant open it with my link attached

Community
  • 1
  • 1
user101010
  • 543
  • 1
  • 5
  • 12
  • 2
    prefilling the message is not allowed according to the platform policy. – andyrandy Apr 18 '16 at 08:52
  • 1
    so I have to use facebook sdk to do that? – user101010 Apr 18 '16 at 09:05
  • 1
    again, prefilling the message is not allowed. with or without any sdk or api. – andyrandy Apr 18 '16 at 10:32
  • 1
    actually it is enough for me to open the message composer with a link attached to a message (without prefiling) is that possible? – user101010 Apr 18 '16 at 13:38
  • @user101010 , het if you havn't found your answer yet, I think you are looking for FBSDKShareKit , see here : http://stackoverflow.com/questions/27064802/facebook-messenger-compose-predefined-message – TheBen Feb 08 '17 at 00:42

2 Answers2

0

I'm thinking it's only possible from the iOS/Android SDK's. I have done a lot of digging including going thru their iOS SDK to see if I could grab the share url. This is what that link looks like when sent from iOS to messenger.

This link will actually work to open your Messenger (but the image will be blank if you don't have anything in the messenger Pasteboard

fb-messenger-platform-20150714://broadcast?pasteboard_type=com.messenger.image&app_id=XXXAPPIDXXX&version=20150714

Notice the iOS SDK saved the image com.messenger.image. Basically they store the image in a Pasteboard. You can read about that here https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPasteboard_Class/)

If anyone has any insight or hidden API's please let me know. Trying to post videos and animated gifs and nothing so far has worked.

This is the only way the iOS SDK sends, I'm still digging thru all the code comments to see if I can find some insight into other params that may or may not be available.

Sorry for the more than likely bad news unless you are building an iOS APP then it's simple.

Michael Bailey
  • 411
  • 5
  • 13
  • There may be a way in Android to do it, I'm just not versed in Java much. Looks like the url being built there my actually work once all the params are filed out which would give you a link that would work elsewhere. android.resource://com.facebook.samples.messenger.send/ https://github.com/facebook/facebook-android-sdk/blob/master/samples/MessengerSendSample/src/main/java/com/facebook/samples/messenger/send/MainActivity.java – Michael Bailey May 02 '16 at 08:56
-2

Please remove facebook app form your device then check, it will work.

Bhuvan1690
  • 12
  • 4