Whether you are a social media addict, or a Power BI analyst, here’s is a common question you always wanted to answer – Who gets the highest number of likes in your favorite public Facebook group?
In this blog post, we will go over the first steps to load your favorite public Facebook group to Power BI, and here is a live version of a report, that uses the same technique to find the most engaging members on Facebook Global Power BI User Group.
Purchase the report above, and gain new insights of any Facebook group.
Last year, in a Global Power BI webinar here, I shared a technique to import public Facebook groups to Power BI. Since then Facebook made some changes to their website, so here is the new way to import public Facebook groups.
Preliminary Steps – Get the Group ID
To analyze your favorite public Facebook group, we should first obtain it’s Facebook Object ID. For some groups, you will find the ID right after this URL path: “https://www.facebook.com/groups/”. If you don’t see a number there, but a textual value (e.g. https://www.facebook.com/groups/powerbi), you will not be able to use that it. Instead, you can apply some reverse engineering tricks:
View the page source in your browser, and search for the text fb://group/. Once you find it, copy the number that follows.
Loading Public Group Feed into Power BI
Open Power BI Desktop (or Excel with Power Query Add-In, or Excel 2016 Get & Transform), and click Get Data. Select Online Services, click Facebook and then click Connect.
In Facebook dialog, paste the group ID (that you retrieved earlier) in the first text box, and click OK.
If this is the first time you are connecting to Facebook using Power BI, follow the sign-in steps and login with your Facebook credentials.
Note: You don’t need to be a member of the group. The group must be public, and if you have more than 5000 members, there is a good chance that you will not be able to extract both likes and comments from the group’s feed, and hit Facebook Graph API user limit due to the inefficient way that the Facebook connector is loading the data.
Click on Record.
Click in Table.
You will see a preview of the feed, loaded into the Query Editor. Next optional steps depending on your scenario – Expand the column object_link, and then expand the connections to import comments and likes.
To get members information, likes and comments, and build a rich report, as was embedded above, we will need to invest many hours together. Instead, why don’t you purchase the full report, and save us the time?
In the main page of the paid report (In the full version) you can analyze the number of shares, likes and comments over time. The basic version doesn’t analyze likes and comments.
In the second page of the full version you can find the most engaging members (by number of likes they receive, comments and shares), and compare their impact over time.
In the third page of the full version, you can find the most engaged members.
In both versions, you can find the most effective hour of day and day of week.
Instructions for Paid Report
Unzip the file, and open the .pbix file using the latest Power BI Desktop (Minimal version: 2017 July update).
To use the report, you will need to find out the Facebook Group ID as I described above. You can reuse the report on many different public Facebook groups. To change the group, click Edit Queries.
In the Queries pane, click on Page Object Name, and paste the Facebook group ID in Current Value, then click Close & Apply.
If this is the first time you are connecting to Facebook using Power BI, follow the sign-in steps with your Facebook account.
That’s it you are ready to go.