Google +分享错误提示 [英] Google + Share getting error alert
问题描述
我必须在 Google plus 上分享一些文本,但是它显示警告,保存您的帖子时出现问题.请重试google plus..我正在使用 Google+ iOS SDK.
I have to share some text on Google plus But it shows the alert, There was a problem saving your post. please try again google plus. I am using the Google+ iOS SDK.
1)我这边怎么了? 2)如何解决此警报?
1) Whats wrong in my side? 2) How can I fix this alert?
谢谢.
推荐答案
If you have not implemented sign in using Google+ then you have to implement Google Plus sign in first.
If you have already implemented then look at this code for sharing :
- (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:
.
This code uses setTitle:description:thumbnailURL:
method to set details.
If you have a web URL of your app then you can use below method instead of setTitle:description:thumbnailURL:
.
[shareBuilder setURLToShare:[NSURL URLWithString:@"https://www.example.com/restaurant/sf/1234567/"]];
有关Google+共享的更多详细信息,请参见 Google Plus共享
:我建议您首先检查您的sign in
实现是否正常工作.
EDIT : I recommend you first check whether your sign in
implementation works properly.
这篇关于Google +分享错误提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!