Forum Discussion
Facebook Page Likes
- 10 years ago
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
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.
- Anonymous10 years agoNot 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.
- DataChant10 years agoMost Valuable Professional
Did you use your own page? The code above uses a metric that is only available for page admins.
- Anonymous10 years agoNot applicable
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.
- mfmom10 years agoNew Member
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"
- mfmom10 years agoNew Member
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?
- DataChant10 years agoMost Valuable ProfessionalThe 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.
- Anonymous8 years agoNot 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?
- Gferreira8 years agoNew Member
I had the same problemn. You should to logout to Facebook, then login again. Get new token and use it on Power BI.