1

Google plusでテキストを共有する必要がありますが、投稿の保存中に問題が発生しましたという警告が表示されます。グーグルプラスでもう一度お試しください。Google+ iOS SDKを使用しています。

1) 私の側で何が問題なのですか? 2) このアラートを修正するにはどうすればよいですか?

ありがとうございました。

4

1 に答える 1

1

Google+ を使用したサインインを実装していない場合は最初に Google+ サインインを実装する必要があります。

すでに実装している場合は、共有のためにこのコードを見てください。

- (void)googlePlusShare
{
    [GPPShare sharedInstance].delegate = self;
    id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];

    // This line will manually fill out the title, description, and thumbnail of the
    // item you're sharing.
    // thumbnailURL is url of image you want to display.
    [shareBuilder setTitle:@"Title of your post"
               description:@"Description of your post"
               thumbnailURL:[NSURL URLWithString:@"https:www.example.com/image.png"]];

    /* This line passes the deepLinkID to our application
     if somebody opens the link on a supported mobile device */
    [shareBuilder setContentDeepLinkID:@"share"];

    // set the text of post. user can edit this before sharing.
    [shareBuilder setPrefillText:@"Your post texts."];

    [shareBuilder open];
}


このコードは、setTitle:description:thumbnailURL:メソッドを使用して詳細を設定します。

アプリの Web URL がある場合は、代わりに以下のメソッドを使用できますsetTitle:description:thumbnailURL:

[shareBuilder setURLToShare:[NSURL URLWithString:@"https://www.example.com/restaurant/sf/1234567/"]]; 


Google+ 共有の詳細については、Google Plus 共有を参照してください。

編集:sign in最初に、実装が適切に機能するかどうかを確認することをお勧めします。

于 2013-06-10T07:39:51.517 に答える