Dominic Xavier
Dominic Xavier

Reputation: 17

Error in callAPI(query, token)

I had tried to access my FB token using the preliminary code shown by pablo over here :

https://github.com/pablobarbera/Rfacebook

However I get the following error message :

Error in callAPI(query, token) : 
  An active access token must be used to query information about the current user.

I used this code:

fb_oauth <- fbOAuth(app_id="14025", app_secret="5fdb6ef5776",extended_permissions = TRUE)

save(fb_oauth, file="fb_oauth")

load("fb_oauth")

I understand that I am not having access using my token despite authentication completion. Could someone please help.

Upvotes: 2

Views: 750

Answers (1)

Josef Šlerka
Josef Šlerka

Reputation: 11

Quick fix is just remove type = "application/x-www-form-urlencoded" from fbOauth.R in RFacebook package. Because now Facebook returns response in JSON format.

Upvotes: 1

Related Questions