Compose a message with a predefined link attached to the iOS application in Facebook Messenger

I use fb-messenger: // compose to open Facebook Messenger Composer, but I need to attach a predefined link to the composer. I do not want to use an action sheet for this. I also saw this answer -

Facebook Messenger creates a predefined message

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

I looked at the Facebook Messenger SDK for iOS -

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

in the section Basic Integration \ Sharing

and all i could find was sharing images, animated gifs, videos and sound clips. But on the other hand, I saw Pinterest sending a link to Messenger from its iOS app - so it's possible.

Any help would be appreciated

Update: I was able to open the messenger in the message using:

fb: // messages / new

still cannot open it with an attached link

0
source share
2 answers

I think this is only possible from the iOS / Android SDK. I did a lot of digging, including through their iOS SDK, to see if I could grab the URL. Here's what this link looks like when sending from iOS to the messenger.

This link will actually work to open your Messenger (but the image will be blank if you have nothing in the Poster folder

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

Please note that the iOS SDK has saved the image com.messenger.image. They mainly store the image in a cardboard box. You can read about it here https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPasteboard_Class/ )

If anyone has any insightful or hidden API, please let me know. Trying to post videos and animated gifs and nothing worked yet.

This is the only way to send the iOS SDK, I'm still digging all the code comments to find out if I can find any idea of ​​other parameters that may or may not be available.

Sorry for the more than bad news, if you are not building an iOS APP then this is easy.

0
source

Please uninstall the facebook application from your device, then check that it will work.

-2
source

Source: https://habr.com/ru/post/1207417/


All Articles