Closed diegocgaona closed 6 years ago
I'm experiencing the same error. It asks me for page access token, but I use the temporary token because the fb_oauth isn't working for a while.
Yes, Facebook had some changes. Can be fixed: -Go to the dashboard of your app -left: click on "Facbook Login" -> Settings -Now paste in the field "Valid OAuth redirect URIs" http://localhost:1410/ -fbOAuth() should now work again in R again
Hi @adrauc !
Thanks! I already did that (because FB show a message about the change in redirect) before I opened the issue. I tried it and other changes, but without success. Here is my config, any other option is wrong?
@diegocgaona you should use getPageToken instead fb_oauth. Try:
token <- getPageToken("yourpage", fb_oauth) fb_page_fans <- tail(getInsights(object_id = fbpage_id, token = token, metric = c('page_fans'), period = c('lifetime')), n = 1)
Many thanks @anankeman ! Worked fine for me, I hope it will help the others.
@diegocgaona @anankeman I'm trying to use the getInsights
function and getting the This method must be called with a Page Access Token
error.
I tried fb_oauth <- fbOAuth(app_id=.....
and get this error
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error in oauth2.0_access_token(endpoint, app, code = code, user_params = user_params, :
Bad Request (HTTP 400). Failed to get an access token.
I then tried to use the generated token via https://developers.facebook.com/tools/explorer/
With that token, I'm able to use the getPage
function but getInsights
give me the following error:
This method must be called with a Page Access Token
even when the graph api explorer says that I have that permission
Do you know what I'm doing wrong?
@setegonz sorry, i'm not using it anymore. Probably is something with the permissions or API version, Facebook was making my life hard too, changing the API and the access...
@setegonz sorry, i'm not using it anymore. Probably is something with the permissions or API version, Facebook was making my life hard too, changing the API and the access...
Sem problemas. Obrigado!
I'm having a error when I try to get data:
The process of creation of the token is OK, but when I try to access the API data, I receive this error (i'm using the last official version of RFacebook.)
I followed the tutorial (it worked until now): http://thinktostart.com/analyzing-facebook-with-r/
And used:
Then I try to get data, example:
And get the error above... The app is already configured with localhost too.
Any idea? I think I need to create a different token, a Page Token, but I don't know how.