Forum Discussion
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!
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
30 Replies
- DataChant
Most Valuable Professional
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.
- AnonymousNot applicable
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.
- DataChant
Most Valuable Professional
Did you use your own page? The code above uses a metric that is only available for page admins.
- AnonymousNot applicable
Hello DataChant,
I tried to apply the solution that you indicated, but this one has an authentication error and is already authenticated, what can I do?
- GferreiraNew Member
I had the same problemn. You should to logout to Facebook, then login again. Get new token and use it on Power BI.
- MattAllington
Community Champion
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
- ColinFrequent Visitor
Ahh ok that makes sense. That was fast. Thank you!