0

iOSアプリにログインせずにGoogle+の画像をGoogle+で共有したいのですが、ログインしていないGoogle+のテキスト、画像、URLを共有する

私が使用している:

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]; 
} 

私は..同じ方法で画像を送信するためにどのようにこの質問に答えるためにたぶん遅すぎる

+0

私はサファリにリダイレクトすると、共有ボタンのみの表示になります。POSTボタンが表示されない場合は、Google Plusページにリダイレクトされます。 –

答えて

1

得ていないのですが、誰かが有用であろう。

NSURL *shareURL = [NSURL URLWithString:@"https://example.com/image.jpg"]; 
urlComponents.queryItems = @[ 
     [[NSURLQueryItem alloc] initWithName:@"url" value:[shareURL absoluteString]], 
     [[NSURLQueryItem alloc] initWithName:@"text" value:text] 
    ]; 
関連する問題