1

我必须在Google plus上分享一些文字,但它显示警报,保存您的帖子时出现问题。请再试一次谷歌加。我正在使用Google+ iOS SDK。

1)我这边有什么问题?2) 如何修复此警报?

谢谢你。

4

1 回答 1

1

如果您尚未使用 Google+ 实现登录,那么您必须先实现Google Plus 登录

如果您已经实现,请查看此代码以进行共享:

- (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:方法来设置详细信息。

如果您有应用程序的网址,则可以使用以下方法而不是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 回答