Quickblox Google Login

纵然是瞬间 提交于 2019-11-27 08:26:34

问题


I have already implemented Facebook login with my quickblox application, but I was wondering if there was any way to implement Google login as well? There's nothing on their documentation that would suggest that, but I was just wondering if anyone on here has figured out how to do it? Thanks!


回答1:


QuickBlox doesn't support Google+ out of the box like Twitter and Facebook,

but, anyway, you can implement Google+ login.

For example, you have Google+ email and you would like to use it to login to QuickBlox,

here is what you can do:

NSString *googleEmail = @""; 

[QBUsers logInWithUserEmail:googleEmail password:[googleEmail hash] delegate:self];

First time when you do this - this request will fail because you don't have such user.

You need to process this error and create new user:

QBUUser *user = [QBUUser user];
user.email = googleEmail;
user.password = [googleEmail hash];

[QBUsers signUp:user delegate:self];

and then repeat login request.

Fore more info you can refer Users code sample

And you can build password using any algorithm you want, this just an example with hash

make sense?



来源:https://stackoverflow.com/questions/24831440/quickblox-google-login

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!