Social Networks Integration Manual

Ask tech team
From QuickBlox Developers (API docs, code samples, SDK)
Jump to: navigation, search

Contents

 Social Networks Integration Manual

As of now we support authentication via Facebook and Twitter. More to come in future.

Most of the manual apply to both providers. Differences will be described if needed.

Prepairing for the first authentication

Registering an appllication

First of all you need to register an application with Facebook or Twitter.

While registering the application supply Callback Url:

Qbfbcallbacksetup.png

Qbtwittersocialcallbacksetup.png


Enabling social integration

  1. Create a new app or modify existing one with QuickBlox - go to QuickBlox Admin panel
  2. Enter auth credentials for the platform you want to enable

QuickBlox_admin_set_socialIntegrationDetails.png


First Login

The entry points are:

  1. Session
  2. Login

Session

As described session creates application level token and can authenticate user with one request(user level token). It is also true for social login.

The only difference - you don't need to supply login/password, just provider=%provider_name%.

What it does:

Creates a new user or finds existing one and authenticates him.

Login

Basicly does the same thing as Session, but with some addition.

Same: To create/authenticate user you just need to provide application level token and specify auth provider.

Addition: If you have existing user and want to give him abbility to authenticate via Facebook/Twitter, you should provide user level token instead.


How It Works

Both Session and Login behaves identical with social login.

After posting the necessary info QuickBlox will return you a 302 HTTP Redirect internaly in QuickBlox . After that you'll recieve another 302 HTTP Redirect to Facebook/Twitter site. Submit a form and you'll be redirected to the callback url you specified in section Registering an application. Finaly the user level token will be returned to you.