我在嘗試將我應用中的內容分享給Google Plus。爲此,我用下面的代碼:iOS Google Plus整合與分享
-(IBAction)handleGPlus{
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] shareDialog];
[shareBuilder setURLToShare:[NSURL URLWithString:@"http://dummy.com"]];
[shareBuilder setTitle:@"Some title" description:@"Some description" thumbnailURL:[NSURL URLWithString:@"http://dummy.com/image"]];
[shareBuilder setContentDeepLinkID:kClientId];
[shareBuilder open];
}
而且我已經建立了像這樣的clientID的:
static NSString * const kClientId = @"MY_CLIENT_ID";
,但我得到了以下錯誤:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'You must specify |clientID| for |GPPSignIn|'
*** First throw call stack:
(0x346932a3 0x3c33897f 0x346931c5 0x1d2e33 0x122725 0x365860c5 0x36586077 0x36586055 0x3658590b 0x36585e01 0x364ae5f1 0x3649b801 0x3649b11b 0x3819e5a3 0x3819e1d3 0x34668173 0x34668117 0x34666f99 0x345d9ebd 0x345d9d49 0x3819d2eb 0x364ef301 0xee20d 0xed600)
libc++abi.dylib: terminate called throwing an exception
我也包括了GoogleOpenSource.Framework
和GooglePlus.Framework
文件。
任何想法我做錯了什麼?
因爲您沒有分配GPPSignIn類的client_id – chandan