Forum Discussion
Facebook Page Likes
- 10 years ago
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
What about page likes without knowing who liked your page. How do you get that?
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"
- jessicaf319 years ago
Advocate I
Hi DataChant,
I've tried to do what you just described, but I have an error: Column1 has not been found...
Do you know why ?
Thanks !!
- DataChant8 years ago
Most Valuable Professional
Can you please share the M expression?
Facebook made some changes recently, and you cannot use the Facebook connector to read user likes.
- Anonymous8 years agoNot applicable
DataChant
Of course,let
Source = Facebook.Graph("https://graph.facebook.com/v2.2/rgmtecnologia/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"I can no longer read the tanned of the users? Is there another way to get this information for power bi?
Thanks for your help.
- Anonymous9 years agoNot applicable
Hi,
I too have this error.
Thanks
- procyon8210 years ago
Resolver I
Thanks. I played around in the Graph API Explorer and found 'fan_count'. The following seems to do the trick.
= Facebook.Graph("https://graph.facebook.com/v2.7/pagename?fields=fan_count")How do I combine this with dates, so that I can show page likes growth over time?
Engagenment also works, but again I don't know how to combine this with a date.
= Facebook.Graph("https://graph.facebook.com/v2.7/pagename?fields=engagement")- DataChant10 years ago
Most Valuable Professional
Try to use the field since as a parameter in the URL. More details here.
- sarafenwick9 years agoFrequent Visitor
I'm having trouble getting the since function to work in conjunction with the access token... can you provide how you would modify the below to include a since period?
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"
- DataChant10 years ago
Most Valuable Professional
Procyon82, try to use the field since as a parameter in the URL. More details here.
- procyon8210 years ago
Resolver I
I tried that using unix timestamp, but it just gives me today's total page likes. How do others answer questions regarding page like growth? It can't be that hard...