0

I'm connecting to Facebook API v3.2 in order to get my friends information. I had the following error:

Invalid Scopes: user_relationships, publish_actions. This message is only shown 
to developers. Users of your app will ignore these permissions if present. Please 
read the documentation for valid permissions at: 
https://developers.facebook.com/docs/facebook-login/permissions

How to fix this issue using API v3.2?

I have proceeded to the following steps:

  1. I connect to the Facebook API via App: I have created a new Facebook APP (from https://developers.facebook.com) and set it up by default.

  2. I connected to the Facebook API v3.2 via authentication token (from https://developers.facebook.com/tools/explorer) and I obtained access token of all necessary permissions.

I used this R code in RStudio to connect to my API:

install.packages("devtools")
library(devtools)

# I used install_github to get the updated version of Rfacebook package
install_github("pablobarbera/Rfacebook", subdir="Rfacebook")
require (Rfacebook)
  1. I used this fb_oauth to connect my R session with the App I already created and authenticate it to my Facebook profile for Data Mining.
fb_oauth <- fbOAuth(app_id="My_APP_ID", app_secret="MY_APP_SECRET_KEY", extended_permissions = TRUE)

I expect that the token will give access to some of the authenticated user's private information (birthday, hometown, location, relationships) and that of his/her friends, and permissions to post status updates as well as to access check-ins, likes, and the user's newsfeed.

But I got the following error on RStudio command line.

Copy and paste into Site URL on Facebook App Settings: http://localhost:1410/ 
When done, press any key to continue...
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.
Z.Lin
  • 28,055
  • 6
  • 54
  • 94
Joe
  • 575
  • 6
  • 24
  • 1
    There is not fixing this, those permissions have been removed. The message already told you that you should check what permissions are available and where to do that - could you not be bothered, or what? – 04FS Apr 25 '19 at 14:12
  • 2
    _“in order to get my friends information”_ - forget about it, you don’t get any user information any more, unless those users explicitly log into your app and grant it the necessary permissions from their end. Heck, you don’t even get to see friends of the user that are not also users of your app as well. You’re a bit too late on the “Facebook data free for all” bonanza here. – 04FS Apr 25 '19 at 14:14
  • @04FS Thanks for your answer. So now there is no possibility (or solution) if I want to analyze my Facebook friends network with R?! – Joe Apr 25 '19 at 14:34
  • That is correct. – WizKid Apr 25 '19 at 15:58

0 Answers0