Reply
Frequent Visitor
Posts: 11
Registered: ‎02-10-2016
Accepted Solution

Facebook Page Likes

Hi everyone,

 

I am building a dashboard for my Company's marketing department. So far, I have been able to load all of the data related to our page's "Posts" using the Get Data wizard with Facebook as the source.

 

I cannot figure out how to pull the data of those accounts that "like" our page. When I use the Get Data wizard and choose Facebook as the source, it lists "Likes" as a connection option. When I choose this data, it imports the accounts that our Company Facebook page likes, not those who like us. 

 

Is there any way to pull those accounts who like our page using PowerBI?

 

Thanks!


Accepted Solutions
Super User
Posts: 1,631
Registered: ‎07-03-2015

Re: Facebook Page Likes

I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post


All Replies
Super User
Posts: 1,631
Registered: ‎07-03-2015

Re: Facebook Page Likes

I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Frequent Visitor
Posts: 11
Registered: ‎02-10-2016

Re: Facebook Page Likes

Ahh ok that makes sense. That was fast. Thank you!

Highlighted
Member
Posts: 111
Registered: ‎04-24-2016

Re: Facebook Page Likes

You can get the number of likes by manipulating the Facebook Graph API URL in the Query formula to call for the [page]/insights/page_fans metric.

 

Here is an example (modify the page name which is highlighted in bold)

 

 

let
    Source = Facebook.Graph("https://graph.facebook.com/v2.2/datachantblog/insights/page_fans"),
    #"Removed Other Columns" = Table.SelectColumns(Source,{"values"}),
    #"Expanded values" = Table.ExpandTableColumn(#"Removed Other Columns", "values", {"value", "end_time"}, {"value", "end_time"})
in
    #"Expanded values"

If you are considering a rebust Facebook dashboard with Power BI, you can learn some cool tips and tricks in my blog.

Feel free to contact me if you have any further questions.

Frequent Visitor
Posts: 2
Registered: ‎08-07-2016

Re: Facebook Page Likes

It appears tis ain't working anymore. 

 

I copy-pasted the code below, but that gave some errors on the "values" column (does that mean it finds something?). When "Removed Other Colums" and "Expanded Values" were removed though, it just keeps waiting for graph.facebook.com. 

 

Any thoughts? I tried updating the API version number but no result. 

Member
Posts: 111
Registered: ‎04-24-2016

Re: Facebook Page Likes

Did you use your own page? The code above uses a metric that is only available for page admins.

Frequent Visitor
Posts: 2
Registered: ‎08-07-2016

Re: Facebook Page Likes

Yep, I am one of the admins of the page. I did not create it (thus do not own it) but I believe Facebook makes no difference between those. 

Frequent Visitor
Posts: 3
Registered: ‎08-24-2016

Re: Facebook Page Likes

Yup, I confirm that this is not working anymore. Calls in PowerBI to the Facebook API metrics /insights/* just hang forever "waiting for graph.facebook.com"

Frequent Visitor
Posts: 3
Registered: ‎08-24-2016

Re: Facebook Page Likes

I confirm that this is not working anymore. Calls to the Facebook API metrics /insights/* just hang forever "waiting for graph.facebook.com". Something must be broken with the PowerBI Facebook connector. Can anyone help?

Member
Posts: 111
Registered: ‎04-24-2016

Re: Facebook Page Likes

The best way to get Facebook data at this stage is to use the Web Connector. You can follow my blog http://datachant.com for many examples.