我必须在 Google plus 上分享一些文字但是它显示警告,保存帖子时出现问题。请再试一次google plus。我正在使用Google+ iOS SDK.
1)我身边哪个错了? 2)如何修复此警报?谢谢。
答案 0 :(得分:1)
如果您尚未使用Google+实施登录,则必须先实施Google Plus sign in。
如果您已经实施,请查看此代码进行分享:
< / p>
- (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 Sharing。
编辑:我建议您先检查sign in
实施是否正常。