[英]React-native excludes Sharing Facebook Messenger
I use react-native-share, to share a link. 我使用react-native-share共享链接。 It's work great with imessage & whatapps but it's crash with Facebook Messenger (I wanted to make a facebook messenger sharing but I didn't find how to do it...)
它可以与imessage和whatapps一起很好地工作,但是与Facebook Messenger一起崩溃(我想共享一个Facebook Messenger,但我没有找到方法...)
So the question is: How I can know the facebook messenger activity type ? 所以问题是:我怎么知道Facebook Messenger活动类型? I want to add it to this list:
我想将其添加到此列表中:
excludedActivityTypes: [ 'com.linkedin.LinkedIn.ShareExtension', 'com.apple.UIKit.activity.PostToFacebook', 'UIActivityTypePostToTwitter', 'com.apple.reminders.RemindersEditorExtension', 'com.apple.mobilenotes.SharingExtension', ],
To prevent any crash from the user. 防止用户崩溃。
Regards, Youcef 此致Youcef
The simplest way is to use web link, it simply opens the messenger app: 最简单的方法是使用Web链接,它只是打开Messenger应用程序:
<a href=”fb-messenger://share/?link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fsharing%2Freference%2Fsend-dialog&app_id=123456789”>Send In Messenger</a>
window.open('fb-messenger://share?link=' + encodeURIComponent(link) + '&app_id=' + encodeURIComponent(app_id));
reference: https://developers.facebook.com/docs/sharing/messenger/web 参考: https : //developers.facebook.com/docs/sharing/messenger/web
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.