Forum Discussion
Facebook Page Likes
- 10 years ago
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
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.
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 ago
Most Valuable Professional
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.- procyon8210 years ago
Resolver I
What about page likes without knowing who liked your page. How do you get that?
- DataChant10 years ago
Most Valuable Professional
Here is an example with Web.Contents to get your Facebook Likes:
let
YourFacebookObjectName = "datachantblog",
YourAccessToken = "Get the token from Facebook Graph Explorer, or APIGEE", Source = Json.Document(Web.Contents("https://graph.facebook.com/v2.7/" & YourFacebookObjectName & "/insights/page_fans?access_token=" & YourAccessToken)), data = Source[data], #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"values"}, {"values"}), #"Expanded values" = Table.ExpandListColumn(#"Expanded Column1", "values"), #"Expanded values1" = Table.ExpandRecordColumn(#"Expanded values", "values", {"value", "end_time"}, {"value", "end_time"}) in #"Expanded values1"