我有一个 google+ api 应用程序将日志记录到 google+ 并分享得很好,但是在发布或取消帖子后它不会返回到应用程序我尝试调试它并且它没有进入 - (void)finishedSharing:(BOOL)shared {
- (IBAction)googlePlusPost:(id)sender {
SLServiceTitle = @"Google+";
/*[[[[share shareDialog] setURLToShare:[NSURL URLWithString:urlToShare]]
setPrefillText:textToShare] open];*/
[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:urlToShare]];
/* 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:textToShare];
[shareBuilder open];
}