I’m no Programmer! But this is How I Extract/scrape ANY public Facebook Page Posts Data to Excel using Facebook Graph API

0

Are you social marketer and you want to get deep insights of your competitor or page related to your niche? However, the problem is that you are not a programmer?! Well, we got you covered. We are here to help you scrape Facebook Page Posts Data to Excel using Facebook Graph API without programming skills, and yes, it is free! scrape facebook data scrape facebook page data scrape facebook page data how to extract data from facebook page

You can Scrape Facebook Page Posts Data to Excel using Facebook Graph API without programming skills:

  • The number of likes, shares, and comments for each post
  • The number of Facebook reactions (Like, Love, Haha, Wow, Sad, Angry) for each post
  • The message of each post (Facebook status messages)
  • Facebook IDs for the users who have liked, commented on or shared a post
  • Facebook post comments on each post

So what are we waiting for? Let’s get going!

Step-by-Step process to Scrape Facebook Page Posts Data to Excel using Facebook Graph API without programming

Step 1: Get an access token from Facebook Graph API Explorer

This is a must-step before you initiate scraping. You need to:

  • Login to your personal Facebook Account
  • Go to Facebook Developers Tools
  • Moreover, then you will get an access token as shown below

scrape Facebook Page Posts Data

This token expires after two hours, and if you are in search of never expiring access token, you need to set up your own Facebook Developers Account (don’t worry, I repeat, you need no coding knowledge!)

 

How-To: Get Free Unlimited Email Address without Phone Number Verification in 2018

 

To get an Access token that never expires:

scrape Facebook Page Posts Data

  • You will be asked to fill up the details (words like Facebook, FB are prohibited in an App name)
  • Go to Settings → Basic

scrape Facebook Page Posts Data

  • There you get App ID and App Secret

This is it, put in this format App ID|App Secret, and it is your never expiring access token and can be used to scrape facebook page data anytime.

how to extract data from facebook page how to extract data from facebook page how to extract data from facebook page

Step 2: Get Facebook PageID you are trying to scrape facebook page data.

Note: You must enter your access token, above is just an example, and you get Page ID like shown in the screenshot.

scrape facebook page data

Step 3: Scrape Facebook Page Posts Data to Excel using Facebook Graph API

  • Go to

https://graph.facebook.com/v2.6/{pageID}/posts/?fields=message,link,permalink_url,created_time,type,name,id,comments.limit(0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&limit=100&access_token={your-access-token}

Note: You can get 1st 100 posts insights on every page in a chronical order

I put it like

https://graph.facebook.com/v2.6/352364611609411/posts/?fields=message,link,permalink_url,created_time,type,name,id,comments.limit(0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&limit=100&access_token=EAACE (truncated)

scrape facebook page data

  • Scroll to the bottom of the page; you will see pagination “next

scrape facebook page data

  • To Scrape facebook data between Specific Dates:

https://graph.facebook.com/v2.6/YourPagaNameOrID/posts/?fields=message,link,permalink_url,created_time,type,name,id,comments.limit(0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&until=2017-02-17&since=2017-01-01&limit=100&access_token=EAACE (truncated)

 

The scrape facebook data you obtain via above link needs to be converted so for that follow next steps!

scrape facebook page data scrape facebook page data scrape facebook page data

CHECK: How to Tag | Mention all your Facebook friends at once in One Click in 2018

how to extract data from facebook page how to extract data from facebook page how to extract data from facebook page how to extract data from facebook page

 Step 4: Converting JSON file to CSV/Excel Sheet

scrape facebook data

For more to scrape Facebook data, scroll to the bottom of the JSON response and copy like below URL after the pagination “next”

scrape facebook data

https://graph.facebook.com/v2.6/352364611609411/posts?fields=message,link,permalink_url,created_time,type,name,id,comments.limit\u0025280\u002529.summary\u002528true\u002529,shares,likes.limit\u0025280\u002529.summary\u002528true\u002529,reactions.limit\u0025280\u002529.summary\u002528true\u002529&limit=100&access_token=EAACE(truncated)

 

Unfortunately, if you enter this URL into your browser as it is, it will bring an error.Reason being it has these values(\u002528,\u002529) which can’t be interpreted by the browser. Actually, these values represent the open paranthesises; “(“ and “)” respectively.

  • So we need to clean the URL before entering into the browser. Copy and paste the URL into Notepad text editor for Windows. Then use the find and replace all feature.Find ‘\u002528’ and replace all with ‘(‘ then find ‘\u002529’ and replace all with ‘)’. (note: everything without quotes)

extract/scrape ANY public Facebook Page Posts Data extract/scrape ANY public Facebook Page Posts Data

  • And we will get the final URL like:

https://graph.facebook.com/v2.6/352364611609411/posts?fields=message,link,permalink_url,created_time,type,name,id,comments.limit(0).summary(true),shares,likes.limit(0).summary(true),reactions.limit(0).summary(true)&limit=100&access_token=EAACE(truncated)

Paste it into URL box and you’ll get next 100 JSON data and go through Step 4 again to get CSV file.

 

 

 Step 5: Analysis of Scrape Facebook Data

As you have received CSV file, now you can sort which posts received the most likes in descending order

extract/scrape ANY public Facebook Page Posts Data

The same procedure can be repeated for the Comments and Shares.

 

 Step 6: Extracting the Facebook ID of Users who commented, liked or shared:

You need to get the post ID of which you are trying to extract data:

scrape facebook data

 

Step 6a: Scrape Facebook ID of users who liked:

  • Go to https://graph.facebook.com/post-id/likes?limit=2000&access_token=EAACEdE (Truncated)
  • Copy the JSON data and follow Step 4

Step 6b: Scrape Facebook ID of users who commented:

  • Go to https://graph.facebook.com/post-id/comments?limit=900&access_token=EACEdE (Truncated)
  • Copy JSON data and follow Step 4

Step 6c: Extract Facebook ID of users who shared:

  • Go to https://graph.facebook.com/post-id/sharedposts?limit=2000&access_token=EAACEdE (Truncated)
  • Copy JSON data and follow Step 4

 

 

Step 7: Extract Reactions for every post

scrape facebook data

 


Note: A free trial account will enable you to try all the packages for 14 days without a credit card. You will be able to export data into Excel/PowerPoint format, or you can sign up for a totally free account which allows you to analyze a maximum of 3 Facebook profiles and one month of data. However, the free account does not enable you to export data into Excel or PPT format – you can only export data from your free account into PDF/PNG/JPG format.


 

  • Sign up and Add profile

extract/scrape ANY public Facebook Page Posts Data

 

  • Analyse the Reactions data:

extract/scrape ANY public Facebook Page Posts Data

 

VERDICT:

With all this above knowledge, you are about to get very deep insights of your competitor, and this might help you in your marketing. So, what do you think of this SUPER-POWER being able to scrape Facebook Page Posts Data to Excel using Facebook Graph API?

 


DON’T FORGET TO READ: