In this step, we will copy the returned JSON response and convert it into CSV or Excel using free to use online JSON to CSV/Excel converter. YourPagaNameOrID/posts/?fields=message,link,_url,created_time,type,name,id,comments.limit(0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&until= &since= &limit=100&access_token= Step 4:Converting JSON file to CSV/Excel Run below query make sure to change the since and until dates. Do include your page name/ID and access token as well. The previous query will return data in chronological order.What if you want to scrape data between specific dates? Please observe the pagination at the bottom of the page as we will refer to it in step 4 for retrieving more data. If everything is correct the browser will return a JSON response which looks like the window below (0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&limit=100&access_token=EAACEdE (Truncated) You must use your own access-token, not mine, or it won’t work The URL I entered on the browser is like this one below with all the fields filled in but since the access-token is so long it is not shown here in full. In order to get the unique ID, you will need to enter the following URL in your browser. Our competitor page for this tutorial will be Platnumz is a famous musician from Tanzania. In this step, we will get the Facebook unique ID of our competitor Facebook fan page. Step 2:Get your competitor’s Facebook Fan Page ID from the Graph APIįacebook assigns unique IDs to every Facebook fan page. For example, this is my never expiring access token 1179322318819014|a5axxxxxxxxxxxx. The never expiring access token will be your app ID|app secret .Don’t forget the pipe “|” between the app ID and app secret. After setting up your account then go to your dashboard>settings>basic then click show App secret. You must create a Facebook for Developers account to be able to create an access token which never expires. The above-generated token normally expires after 2 hours and you can always get a new one by clicking Get Token.īut What if you want an access token which never expires? Copy and paste it to store safely somewhere because we will need it in the later steps. You will see the access token (see the red rectangular box below) already generated for you. Step 1:Get Access Token from the Facebook Graph API Explorerįirst,We need to get an access token from the Facebook Graph API explorer.We will use the token to get authentication to pull data from Facebook databases.This is a must do step!You will need to login using your private Facebook account.Īfter successfully logging in you will be redirected to the Facebook Graph API explorer interface as shown in the window below. 8.3 Step 3:Analysing Facebook reactions data.8.1 Step 1:Sign up for a free account with Quintly.8 Extracting Facebook Reactions for each post into Excel.7.3 Step 7c:Extracting Facebook IDs of users who share a post.7.2 Step 7b:Extracting Facebook IDs of users who like a post.7.1 Step 7a:Extracting Facebook IDs of users who comment on a post. 7 Step 7:Extracting Facebook IDs of users who like,comment or share a post.6 Step 6:Exporting Facebook posts comments to Excel.4 Step 4:Converting JSON file to CSV/Excel.3.0.1 Scraping data between specific dates.3 Step 3:Pulling data from your competitor’s Facebook page.2 Step 2:Get your competitor’s Facebook Fan Page ID from the Graph API.1.0.1 An access token which never expires.1 Step 1:Get Access Token from the Facebook Graph API Explorer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |