我正在尝试在我的ios应用上与G + API分享内容。
这是登录信息:
GIDSignIn *signIn = [GIDSignIn sharedInstance];
signIn.delegate = self;
signIn.uiDelegate = self;
signIn.scopes = @[ kGTLAuthScopePlusLogin ];
[signIn signIn];
登录后我调用此函数:
-(void) postGooglePlus
{
id<GPPShareBuilder> shareBuilder = [[GPPShare sharedInstance] nativeShareDialog];
[shareBuilder open];
}
但我收到了这个错误:
[lvl=3] -[GPPNativeShareBuilderImpl open] User must be signed in to use the native sharebox.
我在开发者控制台上设置了Google+ API。
为什么会出现此错误?