Member-only story
Python HOW: Getting Facebook Data and Insights Using facebook-sdk

At the end of this article you will learn how to get valuable data and insights of a page you’re an admin. It assumes you’ve already obtained a permanent page token. If you’ve not, check my 👉 article first
The Graph API 🍇
Data in FB is represented using the idea of a “social graph”. To interact with a graph we use an HTTPS-based API called the Graph API. To return a graph object using the obtained page token:
A graph is made up of 3 hierarchical components:
- A node which is an individual object with a unique ID
- An edge which is a connection between one node and another
- Fields which are node properties
Example 1: a page object is a node, all its posts are edges, and the page’s about and category are some of its fields