Forum Discussion
Facebook Page Likes
- 10 years ago
I believe this is explicitly prevented by Facebook for either privacy and/or corporate IP purposes
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"
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 agoMost 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.
- Anonymous9 years agoNot applicable
Hi,
I too have this error.
Thanks
- 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.
- DataChant8 years agoMost Valuable ProfessionalHi Anonymous
You cannot read insights any longer using the Facebook connector. If you are an admin of the page you can still do it using Web.Contents, but you will need to get a page access token, which are challenging to get if you are not developer. Will you be satisfied with a report that requires contact manual update to the access token? - gabriel_2648 years agoFrequent Visitor
Good morning! What do you mean by "web.contents"? I'm facing the same problem but can't figure it out.
Thanks!
- sirros_iot7 years agoHelper III
Hello DataChant, could you help me with something?
I would like to get the data from page fans like:
date page_fan_add
01/02/2019 12
02/02/2019 15
...
And I'm getting the data by Web.Contentes as you can see below:
let
Fonte = Json.Document(Web.Contents(
"https://graph.facebook.com/v3.2/2079445882318439? fields=name%2Cfan_count%2Clink%2Cusername%2Cposts&access_token=%...%"))
in
Fonte
I found this "page_fan_adds_by_paid_non_paid_unique" at the documentation but I don't know how and if I can use it at the URL, do you know something about it? Can I use it?
Best Regards,
Diego S. Lutckmeier