我想在 Google+ 上与 Url 共享图片,而无需登录我的 iOS 应用程序。
我用过 :
NSString *temp = @"Hello World";
// Construct the Google+ share URL
NSURLComponents* urlComponents = [[NSURLComponents alloc] initWithString:@"https://plus.google.com/share"];
urlComponents.queryItems = @[[[NSURLQueryItem alloc]
initWithName:@"text"
value:temp]];
NSURL* url = [urlComponents URL];
if ([SFSafariViewController class]) {
// Open the URL in SFSafariViewController (iOS 9+)
SFSafariViewController* controller = [[SFSafariViewController alloc] initWithURL:url];
controller.delegate = self;
[self presentViewController:controller animated:YES completion:nil];
} else {
// Open the URL in the device's browser
[[UIApplication sharedApplication] openURL:url];
}
我不知道如何使用相同的方法发送图像..