我正在使用UIActivityViewController
在我的项目中进行共享和邮寄。
但仅显示邮件服务和邮件服务,但不显示Facebook,Twitter和其他服务。
NSArray *activityItems = [NSArray arrayWithObjects: shareUrl, nil];
//显示UIActivityviewController
NSURL *shareUrl = [NSURL URLWithString:@"http://www.captechconsulting.com"];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:activityViewController animated:YES completion:nil];
os:ios7
是否依赖于iphone设置? 我已启用权限,我尝试了但结果是一样的....
答案 0 :(得分:0)
您必须在设备设置中添加帐户
<强> Setting > Facebook
强>
Setting > Twitter
设置它然后尝试,
NSURL *shareUrl = [NSURL URLWithString:@"http://www.captechconsulting.com"];
NSArray *activityItems = [NSArray arrayWithObjects: shareUrl, nil];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentViewController:activityViewController animated:YES completion:nil];
如果您共享图像,则会显示相关活动。