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.

2 則留言:

  1. What should I put in the callback Uri?

    回覆刪除
    回覆
    1. The Custom Uri Seheme you defined in the info.plist for luanching your app.

      http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW50
      this link may help

      刪除