Monday, February 27, 2012

Facebook User Authentication: Get access to user data

This is the extension of my previous article on facebook share. But, no need of prior knowledge. Proceed from here.

After registering a developer account @ https://developers.facebook.com/ , create an app.
Note the App-Id and don't forget to add the redirect url under the app settings section.
Also add all the access permissions you would like to get from the user under Auth Dalog section.

All these permissions are to be used later to retrieve corresponding data.

URL pattern to implement the authentication is as follows:

http://m.facebook.com/dialog/oauth?client_id=<APP-ID>
&redirect_uri=<PATH- TO-TARGETTED-LOCATION>
&scope=<ALL-THE-PERMISSIONS-LIKE-email,offline_access>
&response_type=token

Just modify the CAPITAL lettered data, and for the redirect-url no need of using quotation marks("")