顯示具有 redirect Uri 標籤的文章。 顯示所有文章
顯示具有 redirect Uri 標籤的文章。 顯示所有文章

2012年10月21日 星期日

Why Weibo SSO sdk don't jump back to my iOS app

This question is for those didn't watch the documentation of the SSO-sdk(me as an example).

The callback url is not set in the web. It should be placed when you initiate the SinaWeibo instance. It is provided 2 init method and they are:
-(id) initWithAppKey:(NSString*)_appKey 
           appSecret:(NSString *)_appSecrect 
      appRedirectURI:(NSString *) _appRedirectURI
         andDelegate:(id)_delegate 
and
- (id)initWithAppKey:(NSString *)_appKey 
           appSecret:(NSString *)_appSecrect 
      appRedirectURI:(NSString *) _appRedirectURI
   ssoCallbackScheme:(NSString *)_ssoCallbackScheme
         andDelegate:(id)_delegate
We should use the latter one and put the callback Uri as ssoCallbackScheme, then everything will be work fine.