Blogger Ever

How to pull data from Facebook graph API using JSON and Jquery?

How to pull data from Facebook graph API using JSON and Jquery?

Facebook graph API is a huge source of collecting the data about any Facebook account,pages, group, photo or even any link that is shared.In this post I am going to tell that how can you achieve any data using the Facebook graph.SO lets begin with it,

How to access Facebook Graph?

There are different ways to obtain different Graph API objects,some of them are listed below.

For user: graph.facebook.com/USERNAME (replace the USERNAME with the username of the specific account username to access the information)

For Page: graph.facebook.com/USERNAME (same as above)

For Link: graph.facebook.com/ids=?URL (replace URL with a link to know how many times it is shared on facebook)

How to pull the data from Facebook Graph?

To pull the data I am going to use .getJSON() Jquery function that is a easiest way to work with JSON objects.I am going to share,how to pull a user data.

To attain the whole data,check the following pen script.

See the Pen tuIHx by Mohammad Hamza Dhamiya (@mohammadhamza) on CodePen

To attain the specific object,try the following pen.

See the Pen EAsif by Mohammad Hamza Dhamiya (@mohammadhamza) on CodePen


Blogger

2013-2016 Copyright Blogger E\ver . Coded, managed and founded by Mohammad Hamza (@hamzadhamiya) . Hosted on Blogger and fonts used are Raleway and Open Sans.