API – How to Get Started with Facebook API Integration
Join the DZone community and get the full member experience.Join For Free
this article represents steps to get started with facebook graph api . in later articles, i shall explain how to integrate using java and maybe other programming languages. the primary reason i am hooked to facebook integration these days is my need for getting exploratory data from facebook for data analysis for my big data projects . before getting onto use framework such as restfb , it is recommended to play with these apis in the facebook-provided playground. i shall be talking in detail about how to get started with restfb in later articles. please feel free to comment/suggest if i missed to mention one or more important points. also, sorry for the typos.
- how to explore different facebook graph apis?
- how to play with a particular graph explorer page?
how to explore different facebook graph apis
facebook graph api reference could be accessed on following page: https://developers.facebook.com/docs/graph-api/reference/v2.2 . there are different apis listed on this page. some of key ones that i use most are following:
each of the above api is associated with a link that takes one to the detailed page consisting of information about that api. you could then goto graph explorer page for that api which acts as a playground. following image represents the same.
clicking graph explorer takes one to the explorer page. in the image below, graph explorer for node type, page is displayed. the example illuatrates for page-id = cocacola.
how to play with a particular graph explorer page?
following represents instructions on how to get started with exploring specific graph api:
- in order to get started with facebook graph api development, the first and foremost important thing is to play with different facebook graph api and see the results.
- to get started with facebook graph api, you need to create an account with facebook.com
- once create the account, login and try accessing the developers portal of facebook, https://developers.facebook.com/ .
- then, once on developers page, click on tools > graph api explorer.
- this would take you to default graph api explorer page. following is the screenshot:
following are key components of the above displayed page:
- “me” represents node.
- each node may have one or more fields (attributes). “id”, “name” represents fields.
- clicking on “search for a field” will display a list from which an item/field could be selected. look at the picture below.
- once one or more fields get selected, the result would include the details for those fields and the same would be reflected in the query. below diagram represents the “context” fields selection and the resultant query output.
Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
10 Traits That Separate the Best Devs From the Crowd
Deploying Smart Contract on Ethereum Blockchain
Strategies for Reducing Total Cost of Ownership (TCO) For Integration Solutions
Integrating AWS With Salesforce Using Terraform