r - How to use the oauth2.0_token function from httr package with facebook API? -
i have collection of facebook functions relies on httr package.
the usual procedure 1 has set oauth app specs , facebook endpoints. until worked charm when try token oauth2.0_token function error:
waiting authentication in browser... press esc/ctrl + c abort authentication complete. fejl init_oauth2.0(self$endpoint, self$app, scope = self$params$scope, : bad request (http 400).
you see code below:
facebook_app <- oauth_app("facebook", key = "xxxx", secret = "yyyy") # end point facebook_ep <- oauth_endpoint( authorize = "https://www.facebook.com/dialog/oauth", access = "https://graph.facebook.com/oauth/access_token") # token endpoint , oauth fb.token <- oauth2.0_token(facebook_ep, facebook_app, user_params = facebook_ep)
i have been various posts , forums have not had luck in finding solution yet.
solved settting:
sys.setenv("httr_server_port" = "1410/")