问题描述
我在我的应用程序中使用UIActivityViewController为用户提供了一些共享文本的选项.
I am using UIActivityViewController in my app to provide options for users to share some text.
像Facebook,Twitter,whatsapp这样的应用程序一旦安装,它们就会自动显示为UIActivityViewController的选项,而不是Facebook Messenger.
Apps like facebook, twitter, whatsapp once installed they automatically show up as options with UIActivityViewController, but not Facebook Messenger.
我需要对Messenger进行任何特殊设置吗?我正在使用物镜c.
Any special set up I need to do with Messenger? I am using objective c.
推荐答案
根据:
为了使Facebook Messenger出现,您需要将NSURL插入UIActivityViewController activityItems
In order to make Facebook Messenger appear you need to insert NSURL into UIActivityViewController activityItems
NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
NSArray *activityItems = @[url];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
这篇关于Facebook Messenger没有显示UIActivityViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!