Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NA in from_id and from_name #172

Open
Xskysilva opened this issue Feb 14, 2018 · 2 comments
Open

NA in from_id and from_name #172

Xskysilva opened this issue Feb 14, 2018 · 2 comments

Comments

@Xskysilva
Copy link

Hi.
Since some days ago, when I start to get comment from a post, the columm "from_id" and "from_name" has received "NA".

Look:
image

The code:
a<-NULL
i<-NULL
ComentVGSH<-NULL
P<-nrow(posts_VGSH)
U<-P-100
if(U<1){U<-1}
for (i in U:P) {
postVG <- getPost(post=posts_VGSH$id[(i)], n=2000, token=token)
a<- postVG[["post"]][["id"]]
ifelse(nrow(postVG[["comments"]])==0,postVG[["comments"]][1,1]<-0,FALSE)
postVG[["comments"]]$Post <- c(a)
postVG[["comments"]]$Shopping <- c("Várzea Grande Shopping")
postVG[["comments"]]$Indice <- i
ComentVGSH<-rbind(postVG[["comments"]],ComentVGSH)}

What´s could be happening?
Thanks.

Marcel Fernandes - From Brazil.

@nlch
Copy link

nlch commented Feb 16, 2018

Hi @Xskysilva

this is due to a similar issue I opened and closed a while ago about the missing likes table in the getPOst request.
Basically, Facebook has begun to authorize this edge only to page owners.
So you can't get the users' name or id unless you use a page token associated to an admin of the page.
Unfortunately, there's nothing we can do here :(

If you do have admin access to the page, here's a link on how to get the token: https://medium.com/@Jenananthan/how-to-create-non-expiry-facebook-page-token-6505c642d0b1

From Graph Api Reference: "On February 5th, 2018, User information will not be included in responses unless you make the request with a Page access token. This only applies to Comments on Pages and Posts on Pages."
https://developers.facebook.com/docs/graph-api/reference/v2.12/object/reactions

@Xskysilva
Copy link
Author

Perfect dear @nlch. Thank you for the answer.
Anyway, the results are very good.
Congratulations about the project.
Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants