DATA EXTRACTION: Extract Data from Facebook using "Graph API" and Turn Results into CSV Fi
In this blog, the focus will be to extract data from Facebook Pages using Graph API to access information from facebook pages.
User requires to log in to Facebook, and if one does not have a profile, s/he should create one.
Step 1:
Login to Graph API Explorer to get access token:
Step 2:
Access to the ID of the Page (Page_ID), from which is going to be extracted the data such as Comments, Posts, Likes, etc. and the Post ID (Post_ID) of that Page:
Page_ID: It can be achieved from the following page. You just have to enter the URL of the page >>> Find your Facebook ID
Post_ID: there is for each post of a page an ID. You can get it in various ways. One of the ways is:
2.1. Click on the Date of the post
2.2. You will see the Post_ID in the Adress bar:
Step 3:
Enter the Page_ID and Post_ID in the Graph API in this way and press submit:
(Suppose that we are going to extract the comments of the post.)
Hint: By default, you can see only the first 25 Comments in the Graph API Explorer. However, you can change this number using the "limit" Parameter by click on the "Search for a field" bar and changing the number!
Step 4:
Turn Result into CSV Format.
4.1. Install OpenRefine Webapp >>> Download OpenRefine
4.2. Copy the URL using the "Get Code" Button and paste this URL into OpenRefine
4.3. Create a Project