2014-07-18 81 views
1

我在我的應用中集成了Google+分享功能。它在幾天前發現,但從最近3-4天開始,它停止共享意味着它不顯示任何預填文本或圖像等。只是顯示空白份額。Google+在ios上停止分享

我的代碼如下:

<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog]; 
[shareBuilder setTitle:@"Share" description:@"sharing" thumbnailURL:[NSURL URLWithString:@"http://25.media.tumblr.com/tumblr_m9p3n1vJmZ1rexr16o1_400.jpg"]]; 
[shareBuilder setContentDeepLinkID:@"rest=1234567"]; 
[shareBuilder open]; 

我不知道爲什麼出現這種情況?幫我解決這個問題。

回答

0

試試這個

- (void)shareOnGooglePlus:(NSDictionary *)content 
     { 
      GPPSignIn *signIn = [GPPSignIn sharedInstance]; 
      signIn.clientID = (NSString *) TempGoogleClientID; 

      signIn.scopes = [NSArray arrayWithObjects: 
kGTLAuthScopePlusLogin,GooglePlusScopeProfile,GooglePlusScopeEmail,GooglePlusScopeMe,nil]; 
      signIn.shouldFetchGoogleUserEmail = TRUE; 
      //[signIn authenticate]; 
      id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog]; 

      [GPPShare sharedInstance].delegate = self; 

      [shareBuilder setURLToShare:content[URLKey]]; 
      [shareBuilder setPrefillText:content[FeedTitleKey]]; 

     [shareBuilder open]; 
    } 
+0

感謝您的答覆!讓我嘗試。行「signIn.scopes」中的錯誤 – user2893370

+0

。 – user2893370

+0

在那裏給你的範圍。這些是constants.NSString * const GooglePlusScopeMe = @「https://www.googleapis.com/auth/plus.me」; NSString * const GooglePlusScopeProfile = @「https://www.googleapis.com/auth/userinfo.profile」; NSString * const GooglePlusScopeEmail = @「https://www.googleapis.com/auth/userinfo.email」; –