Spread the usage of OAuth

By | 26 July, 2013

Furthermore, the response, which is sent by Facebook API Solution to our application, provide us some useful information about the logged-in user. Thus, we can wisely use the index.html file to print some personal data such as name, location, education, gender, etc. (if available). This enables you to have access to the response object, as the following snippet shows:

function testAPI() {

console.log('Welcome!  Fetching your information.... ');

FB.api('/me', function (response) {

console.log('Good to see you, ' + response.name + '.');

});

}

What is more, you can get the list of users’ friends via Facebook. To face that, just do create another callback function similar to this: FB.api(‘/me’,

So this is the end result after issuing an HTTP GET response. Hehehe, I still did not talk about web-enhanced design…

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

Your email address will not be published.