是否有任何内置的Xcode /代码,允许应用程序检测iPhone/ipad/ipod touch中安装的其他社交媒体应用程序来填充共享功能?Xcode社交媒体分享按钮
有人告诉我,Android有这样的能力,iOS也有这样的能力吗?
是否有任何内置的Xcode /代码,允许应用程序检测iPhone/ipad/ipod touch中安装的其他社交媒体应用程序来填充共享功能?Xcode社交媒体分享按钮
有人告诉我,Android有这样的能力,iOS也有这样的能力吗?
Twitter的整合内置的iOS 5,检查此链接http://developer.apple.com/library/ios/documentation/Twitter/Reference/TWTweetSheetViewControllerClassRef/Reference/Reference.html
对于Facebook来说,你需要使用Facebook SDK,点击这里http://developers.facebook.com/docs/reference/iossdk/
您也可以试试ShareKit ... http://getsharekit.com/
或GetSocialize ... http://www.GetSocialize.com/
这两个都提供功能下降。
thx,将检查ShareKit和GetSocialize。在ShareKit和GetSocialize中,哪一个更常用? –
我不确定哪一个有更多的市场份额。 – ElasticThoughts
[iOS 6](https://developer.apple.com/technologies/ios6/)将提供Facebook集成。 – Adam
- (IBAction) shareHasTapped: (id)sender {
NSString *texttoshare = @"text to share";
// UIImage *imagetoshare = [UIImage imageNamed:@"beck.png"];
NSArray *activityItems = @[texttoshare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityVC.excludedActivityTypes [email protected][UIActivityTypeCopyToPasteboard, UIActivityTypePostToWeibo, UIActivityTypePostToTwitter, UIActivityTypePostToWeibo];
[self presentViewController:activityVC animated:TRUE completion:nil];
}
分享图片社交网络使用UIActivityViewController:
- (无效)shareimage {
NSArray *objectsToShare = @[_s_image];
UIActivityViewController * avc = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
[email protected][UIActivityTypePostToTwitter];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[self presentViewController:avc animated:YES completion:nil];
}
else
{
UIPopoverController *popup = [[UIPopoverController alloc] initWithContentViewController:avc];
[popup presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
}
最好的和做是最简单的方法(我正在寻找小时)http://stackoverflow.com/questions/13287007/social-action-sheet -like-on-ios-6 – makkuzu