用户选择共享或取消后,iOS + +应用不会返回应用

时间:2013-06-14 20:29:46

标签: iphone ios6 google-plus google-bigquery

我有一个谷歌+ api应用程序日志到谷歌+并分享很好,但它没有返回到应用程序发布或取消后我尝试调试它的帖子,它没有输入 - (void)finishedSharing :( BOOL)分享{

    - (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];
   }

3 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

我需要查看你的代码。请发布谷歌+相关代码。您可以参考this question上的答案。

答案 2 :(得分:0)

您需要先使用g +登录,然后使用本机应用对话框在g +上分享视频。

id<GPPNativeShareBuilder> shareBuilder = [[GPPShare sharedInstance] nativeShareDialog];

这将在您自己的应用程序中打开本机窗口。

参考:https://developers.google.com/+/mobile/ios/share/deep-link