DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Securing Your Software Supply Chain with JFrog and Azure
Register Today

Trending

  • 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

Trending

  • 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
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. API – How to Get Started with Facebook API Integration

API – How to Get Started with Facebook API Integration

Ajitesh Kumar user avatar by
Ajitesh Kumar
CORE ·
Jan. 22, 15 · Interview
Like (0)
Save
Tweet
Share
5.52K Views

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.

following are the key points described later in this article:
  • 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:

  • user
  • page
  • post
  • group
  • friendlist

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.

facebook_graph_api_graph_explorer_link
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.

facebook_graph_api_explorer_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: facebook_graph_api_explorer_page
  • 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.
    • facebook_graph_api_explorer_fields
    • 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. facebook_graph_api_explorer_page_fields_selected
facebook API Graph (Unix) Integration Big data

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • 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

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: