My Docs
My BlogPython Data StructuresRepoFamily-Promise-Docs
Web-Dev-Hub-Docs
Web-Dev-Hub-Docs
  • Home
  • Navigation
  • Tools
    • Tools
      • Docker
      • G-Cloud & Firebase
      • Heroku
      • Dropbox
      • Email
      • Tools
      • DuckDuckGo
      • Elasticsearch
      • CodeSandbox
      • Product Hunt
      • Raycast
      • Elasticsearch
      • Tools
      • Showcase
        • Utilities
        • Continued
          • Page 3:
    • Downloads
    • REPL.IT Compilations
      • Part 2
    • Past Notes
      • Command Line Reference
    • Git
    • JavaScript
      • Interview Problems
      • General JavaScript Notes
      • jQuery
      • NodeJS
        • Node argv
        • NPM
        • Express
          • ExpressJS Overview
          • Sequelize
      • Regex
      • React
        • React Examples:
        • Redux
        • Redux Docs
          • Redux Resources
        • React Notes
    • My Bash Commands
    • Learning
  • Programming Languages
    • Programming Languages
      • File System
      • Basics
      • PSEUDO Programing Languages
        • HTML
      • CSS
      • List Of Programming Languages By Type
      • Tools-Of-The-Trade
        • Linux
        • Docker
      • Git
      • Python
        • Pydrive:
        • Practice
        • Pipenv
        • Untitled
      • Bash
        • SED
      • CHEATSHEETS
      • Java
      • Html
      • Markdown
      • CSS
      • SCSS
      • C & C++
      • Ruby
      • SQL
        • PostgreSQL
      • Jest
      • JavaScript
      • Typescript
      • C++
      • Babel
    • What is a Programming Language?
  • Python
    • Python
      • Python General Notes
      • Python Quiz
      • Python Cheat Sheet
      • Python Snippets
      • Python at length
    • Install PIP
  • JavaScript
    • JavaScript
      • Jquery
      • Page 16
    • Writing Files
    • JS-Leetcode
  • Web Development Frameworks & Libraries
    • GRAPHQL
    • React
    • Jquery
      • Prac
    • GATSBY
      • Untitled
      • Building with Components
      • Plugins, Themes, & Starters
      • GraphQL Concepts
  • Productivity
    • Productivity
      • Awesome Productivity Tools for Back-to-School
  • Misc
    • Misc
      • Experiments
  • GitGateway
    • Links
    • Bookmarks
  • Websites
    • Websites
    • Not My Websites:
    • Articles
  • Backend
    • Backend
  • Networking
    • Networks
  • Resources
    • Web Dev Tutorials
      • Node
        • API Security
    • Resources
    • Video Resources
  • General Knowledge
    • General Knowledge
    • Glossary
    • Knowledge Bank
  • Finance
    • Finance
    • Finance Reference
    • Financial Trends
  • Science & Tech (Innovation)
    • Science & Tech
    • Articles
  • Reading
    • Reading
  • Social Media & Trends
    • Trends In Web Dev
    • Analytics
    • FB-Dev-Open Source
      • Content Publishing
    • IG-API
  • Docs
    • Docs
      • NodeJS
        • installed it?
        • Timers in Node.js and beyond
        • Node.js web app
        • Overview of Blocking vs Non-Blocking
        • Don't Block the Event Loop (or the Worker Pool)
  • Code Editors & Tools
    • Vscode
      • Vscode Docs
      • How To Speed Up Vscode
  • Cool Stuff
    • Cool Observable Notebooks
  • Server-Side
    • GraphQL
      • Intro
    • Rest VS GraphQl
    • REST-API
    • Public APIs
  • WEB_DEV_TOOLS
    • Web Dev Tools
    • Cloudinary
    • Postman
      • Creating an API
      • Trouble Shooting Postman
    • Netlify
      • Facebook Graph API
      • Pandoc
      • Graph API
      • Troubleshooting
      • Examples
      • HTTPS (SSL)
      • Open Authoring
      • Netlify CMS
      • Git Gateway
  • DS_ALGOS_BRAINTEASERS
    • A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example
  • Free-Stuff
    • Free Stuff
  • Job-Search
    • Job Search
    • Outreach
  • General Comp Sci
    • Principles behind the Agile Manifesto
  • Blockchain & Crypto
    • Blockchain Basics
      • Basics:
  • Data Structures & Interviewing
    • Data Structures
    • Computational Complexity
  • REACT_REVISITED
    • Modern React with Redux
      • React-Projects
  • WEBDEV-Bootcamp-Notes
    • 🏫Lambda
      • 1.1 - User Interface and Git
      • Page 2
      • Page 1
      • Page 3
      • Page 4
      • Page 5
      • Page 6
      • Page 7
      • Page 8
      • Page 9
      • Page 10
      • Page 11
      • Page 12
      • Page 13
      • Page 14
      • Page 15
      • CS-Python-Notes
        • Python
  • Unsorted-Notes
    • Compiled-Random-Notes
    • Testing:
      • Configure Jest for Testing JavaScript Applications
      • install, configure, and script Cypress for JavaScript web applications
      • Test React Components with Jest and `react-testing-library`
      • Use testing library to evaluate any framework...
  • Medium-articles
    • My Articles
      • Python For JS Developers
      • JavaScript Programmer
      • Awesome Web Development Youtube Video Archive
      • Bash Commands That Save Me Time and Frustration
      • Git-Tricks
      • scrap
      • Medium Article
      • Everything You Need To Know About Relational Databases, SQL, PostgreSQL and Sequelize To Build…
      • Machine Learner
      • Here’s the expanded list:
      • The Complete JavaScript Reference Guide
      • This is really cool!
      • Web Development Interview Part 3💻
      • Mutability And Reference VS Privative Types in JavaScript
      • React
      • Super Simple Intro To HTML
      • Introduction to React for Complete Beginners
      • Web Developer Resource List Part 2
      • Front End Interview Questions Part 2
      • A List Of Tools For Improvement
      • Github Repositories That Will Teach You How To Code For Free!
      • Libraries
      • Machine Learner
      • Here’s the expanded list:
      • The Complete JavaScript Reference Guide
  • 🖲️AI
    • Pytorch
      • Documentation
  • 🎙️Audio
    • Audio
Powered by GitBook
On this page
  • Graph API Explorer Guide
  • Common Uses
  • Requirements
  • Components
  • Sample Query

Was this helpful?

  1. WEB_DEV_TOOLS
  2. Netlify

Facebook Graph API

PreviousNetlifyNextPandoc

Last updated 3 years ago

Was this helpful?

Graph API Explorer Guide

The allows you to construct and perform Graph API queries and see their responses for any apps on which you have an admin, developer, or tester role.

Common Uses

  • Test API queries with your Live app's settings, including approved , , and settings for any added products such as Facebook Login.

  • Test API queries with your Developer Mode app's settings using any and on test users or test data.

  • Quickly generate access tokens.

  • Get code samples of the queries you have run.

  • Generate debug information to include in support requests.

Requirements

  • A .

  • An app for which you have a role, such as an .

Components

Application Dropdown

The Application dropdown menu displays all the apps on which you have an admin, developer, or tester role. Use the dropdown to select the app that you wish to test.

Access Token Dropdown

Add a Permission Dropdown

Whenever you request a User access token, only one permission is given by default, public_profile. The Permission dropdown menu allows you to select User Data Permissions, such as email and user_photos, Events, Groups, and Pages Permissions, such as manage_pages and ads_management, and Other permissions, such as instagram_basic and publish_video permissions. This allows the current app User (which is you) to grant the app specific permissions. Only grant permissions that your app actually needs.

Access Token Field

When you get an access token, it is displayed here. This is the token that is included in your Graph API query.

Query string Field

The current query appears here. You can edit the current query by typing in a new one, or by searching for and selecting fields in the field viewer after executing the query. You can also use the dropdown menus to switch between operation methods, and target different versions of the Graph API.

If you click the star icon at the end of the field, the query is saved as a favorite. You can view your favorite queries by clicking the book icon.

Node Field Viewer

When you submit a GET query on a node, the field viewer displays the name of the node and the fields returned by the Graph API. You can modify your query by searching for and selecting new fields, clicking the plus icon, and choosing from available fields, or unchecking unnecessary fields. These actions dynamically update your query in the query string field.

Response Window

The response to your last submitted query appears here.

Get Code

Copy Debug Information

If your query keeps failing and you can't figure out why, and you decide to contact Developer Support, click this button to copy your query and response details to your clipboard. You can submit this information with your support request to help us figure out what's going on.

Save Session

Click the Save Session button to save the state of your query, with the access token removed. Include the link to this session if you decide to contact Developer Support.

Sample Query

The default query appears in the query string field:

GET https://developers.facebook.com/v5.0/me?fields=id,name

The default query is requesting the id and name fields on the /me node, which is a special node that maps to either the /User or /Page node identified by the token. Since your are using a User access token, this maps to your User node.

The id and name fields are publicly available and can be returned if the User has granted your app the default or public_profile permissions. These permissions are pre-approved for all apps (you can confirm this by clicking the information icon in the Access Token Field), so you don't have to grant your app any additional permissions for the query to work. Click Get Access Token and confirm that you want to grant your app access to your publicly available User information.

The Token dropdown menu allows you to get and exchange App, User, and Page access tokens for the currently selected app. You can also use it to uninstall your app from your User node, which destroys the current access token.

If your app is in development mode, you can grant your app any permission and your queries respect them. If your app is live, however, granting a permission that your app has not been approved for by the process causes your query to fail whenever you submit it.

Click the information icon to see information about the current token, including the app that it's tied to, and any login permissions that have been granted by the User who is using the app (which is you).

If you are happy with your query, click the Get Code button to generate sample code based on the query. Typically you won't be able to copy and paste the sample code directly in your code base, but it gives you a useful starting point.

Try executing the default query that appears when you first load the Graph API Explorer. If you haven't already, , select the app you want to test from the application dropdown menu, and get a User access token.

Submit your query, and you should see your app-scoped User ID and name appear in the response window.

App Review
open the Graph API Explorer in a new window
Open the Graph API Explorer
Graph API Explorer tool
login permissions
features
login permissions
features
Facebook Developer Account
admin, developer, or tester role