本文介绍了编写一条消息,该消息具有从iOS应用连接到Facebook Messenger的预定义链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用fb-messenger://compose打开Facebook Messenger Composer,但是我需要在该Composer中附加一个预定义的链接.我不想为此使用操作表.我也看到了这个答案-

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撰写预定义消息

可能看起来相似,但答案错误,因为它是Facebook SDK,而不是Facebook Messenger.

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

我查看了iOS版Facebook Messenger Messenger-

I looked at Facebook Messenger SDK for iOS -

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

在基本集成\共享内容"下

under Basic Integration \ Sharing Content

我所能找到的就是共享图像,gif动画,视频和音频剪辑.但是另一方面,我看到Pinterest正在从其iOS应用程序发布指向Messenger的链接-这样就可以了.

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.

任何帮助将不胜感激

更新:我设法使用以下方法在撰写邮件中打开了Messenger:

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

fb://messaging/new

fb://messaging/new

仍然无法打开带有我的链接的

still cant open it with my link attached

推荐答案

我认为只有iOS/Android SDK才有可能.我做了很多挖掘工作,包括通过他们的iOS SDK查看是否可以获取共享网址.从iOS发送到Messenger时,链接就是这样.

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.

此链接实际上可以打开您的Messenger(但是,如果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

请注意,iOS SDK已保存图像com.messenger.image.基本上,它们将图像存储在Pasteboard中.您可以在 https://developer.apple.com/库/ios/文档/UIKit/参考/UIPasteboard_Class/)

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/)

如果任何人有任何见识或隐藏的API,请告诉我.尝试发布视频和GIF动画,但到目前为止没有任何效果.

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.

这是iOS SDK发送的唯一方法,我仍在通过所有代码注释进行挖掘,以了解是否可以对可能可用或不可用的其他参数找到一些见解.

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.

很抱歉,除非您正在构建iOS APP,否则还有很多坏消息,这很简单.

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

这篇关于编写一条消息,该消息具有从iOS应用连接到Facebook Messenger的预定义链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 11:32