mobileresearch / weibo_ios_sdk_sso-oauth

sina weibo sdk of sso and Oauth2.0
292 stars 261 forks source link

老版不支持app切换的话如何触发logged in事件? #8

Closed ipeisong closed 10 years ago

ipeisong commented 12 years ago

如果没有安装微博或者是老版的,会弹出一个web页面要求登录。可是登录以后就没有消息了。再打开还是要求登录。请问应该如何处理?

ipeisong commented 12 years ago

看代码好像是在SinaWeiboAuthorizeViewDelegate里处理的,可是这个是封装好的而不是可以调用的是吗?

ipeisong commented 12 years ago

看了文档以后,发现- (void)sinaweiboDidLogIn:(SinaWeibo *)sinaweibo 在web授权成功以后根本没有被调用。

ipeisong commented 12 years ago

刚才已经确认了。因为在附带的Demo里也一样没有调用。BTW 我用的iPad iOS6.

mobileresearch commented 12 years ago

请确认自己应用的授权回调页是否已编辑过,在demo中保证redirect_uri和开放平台上填写的授权回调页一致。

ipeisong commented 12 years ago

login weibo error: Error Domain=SinaWeiboSDKErrorDomain Code=21324 "invalid_client" UserInfo=0x1d8baa80 {NSLocalizedDescription=invalid_client, error={ error = "invalid_client"; "error_code" = 21324; "error_description" = "client_secret error."; "error_uri" = "/2/oauth2/access_token"; request = "/2/oauth2/access_token"; }}

这个错误在web认证里出现,但是SSO就没这个问题。不知道什么原因?谢谢。

EdSancha commented 11 years ago

I also have this issue and Im using the same API Key. Secret and redirect_uri in Android and it works fine, any clues about this ? I'm not integrating the app yet, just using the demo app

EdSancha commented 11 years ago

2012-10-31 10:04:22.674 sinaweibo_ios_sdk_demo[1657:c07] sinaweibo logInDidFailWithError Error Domain=SinaWeiboSDKErrorDomain Code=21324 "invalid_client" UserInfo=0x758dbf0 {NSLocalizedDescription=invalid_client, error={ error = "invalid_client"; "error_code" = 21324; "error_description" = "client_secret error."; "error_uri" = "/2/oauth2/access_token"; request = "/2/oauth2/access_token"; }}

mobileresearch commented 11 years ago

错误就像错误信息里面说的那样 "error_description" = "client_secret error."; 即app_key_secret是错的,请检查下自己的app_key_secret是否和开放平台上的一致。至于sso登录无此问题,是因为sso的认证方式和Oauth2.0有差别。

ipeisong commented 11 years ago

就是说sso不会用到secret或者两个secret不一样?secret都是复制粘贴的。

mobileresearch commented 11 years ago

sso登录过程是在官方客户端完成的,不需要给secret,如果应用secret没在其他地方使用,可以在开放平台上重设一下试试。

EdSancha commented 11 years ago

The secret number is not a problem, as we're using the same values in the Android version of the app, any clues on this ?