pablobarbera / Rfacebook

Dev version of Rfacebook package: Access to Facebook API via R
http://cran.r-project.org/web/packages/Rfacebook
350 stars 250 forks source link

Problems Creating fbOAuth #123

Closed jpw82 closed 7 years ago

jpw82 commented 7 years ago

A few months ago successfully created an fbOAuth and used it extensively but today when I tried to use it again it wouldnt work so I thought it must be expired so I set about trying to make a new one with legit app id and app secret. However, it doesn't seem like its working anymore and never gives the authentication successful message and I am getting some errors back that dont make sense

www-authenticate: OAuth "Facebook Platform" "invalid_request" "An active access token must be used to query information about the current user."

www-authenticate: OAuth "Facebook Platform" "not_found" "(#803) Cannot query users by their username (pablobarbera)"

????

Full message below;

fb_oauth <- fbOAuth(app_id=SECRET,

  • app_secret="SECRET") 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. -> CONNECT graph.facebook.com:443 HTTP/1.1 -> Host: graph.facebook.com:443 -> User-Agent: libcurl/7.51.0 r-curl/2.3 httr/1.2.1 -> Proxy-Connection: Keep-Alive -> <- HTTP/1.1 200 Connection established <- -> POST /oauth/access_token HTTP/1.1 -> Host: graph.facebook.com -> User-Agent: libcurl/7.51.0 r-curl/2.3 httr/1.2.1 -> Accept-Encoding: gzip, deflate -> Accept: application/json, text/xml, application/xml, / -> Content-Type: application/x-www-form-urlencoded -> Content-Length: 477 ->

    client_id=SECRET&redirect_uri=http%3A%2F%2Flocalhost%3A1410%2F&grant_type=authorization_code&code=AQDlEbsUtSlGBycH5rzmEo_qK8gaVp3ENNoQNRtA7EEXq8sJKzgL0TB2JL_ZTzW--0edOLBmZfquDbPYVMgpWBb1aMojUBHfYah6kxgXp-U5vXyAskV50LjWFO1ZbOfQrS8-UZ33S2Az2EN9ZVRmZow_ZKunjBdHwNmHHyW0q6eRthszanjkCquHEaXT4OjRBSKUQw_qcunhej99fK1K3EekUnigIiiJB4uaVQvbvNhZMw9xs_ZmWCmtmRj6kkEQSD35_buuZb8W6oIwwelHXrOTfysPzjKsft2-5FyXCbuEpvj2lWlqx-obKI0jSVb3CEw&client_secret=b20a5311ef2f7029182b4264779f6f89

<- HTTP/2 200 <- access-control-allow-origin: <- pragma: no-cache <- cache-control: private, no-cache, no-store, must-revalidate <- x-fb-rev: 2976566 <- content-type: application/json; charset=UTF-8 <- x-fb-trace-id: EdKNsdLvav2 <- facebook-api-version: v2.3 <- expires: Sat, 01 Jan 2000 00:00:00 GMT <- vary: Accept-Encoding <- content-encoding: gzip <- x-fb-debug: fapEYhX6Il4XF5NP8vMXk2n4dTAzVYKBZIZJv4esDa0bcElNiwMLDN4ZtaBYDwlVzsth99/Xi2G5ri/tpUctOw== <- content-length: 223 <- date: Mon, 24 Apr 2017 19:35:40 GMT <- -> GET /me HTTP/1.1 -> Host: graph.facebook.com -> User-Agent: libcurl/7.51.0 r-curl/2.3 httr/1.2.1 -> Accept-Encoding: gzip, deflate -> Accept: application/json, text/xml, application/xml, / -> Authorization: Bearer -> <- HTTP/2 400 <- access-control-allow-origin: <- www-authenticate: OAuth "Facebook Platform" "invalid_request" "An active access token must be used to query information about the current user." <- pragma: no-cache <- cache-control: no-store <- x-fb-rev: 2976566 <- content-type: application/json; charset=UTF-8 <- x-fb-trace-id: FBHEVHeTT87 <- facebook-api-version: v2.3 <- expires: Sat, 01 Jan 2000 00:00:00 GMT <- vary: Accept-Encoding <- content-encoding: gzip <- x-fb-debug: 7i1xoMWQgBVcsVj0YEe9wt6lCqfR13pip+nFnaW06IJ2ywE59FStCfHThDhK1RtBzccrkJ/MRIl3TzlMf+jlyA== <- content-length: 157 <- date: Mon, 24 Apr 2017 19:35:40 GMT <- -> GET /pablobarbera HTTP/1.1 -> Host: graph.facebook.com -> User-Agent: libcurl/7.51.0 r-curl/2.3 httr/1.2.1 -> Accept-Encoding: gzip, deflate -> Accept: application/json, text/xml, application/xml, / -> Authorization: Bearer -> <- HTTP/2 404 <- access-control-allow-origin: * <- www-authenticate: OAuth "Facebook Platform" "not_found" "(#803) Cannot query users by their username (pablobarbera)" <- pragma: no-cache <- cache-control: no-store <- x-fb-rev: 2976566 <- content-type: application/json; charset=UTF-8 <- x-fb-trace-id: Gnd4sMHudcp <- facebook-api-version: v2.3 <- expires: Sat, 01 Jan 2000 00:00:00 GMT <- x-fb-debug: so/4CY6TQruxAqt75WnUZVBsraQ81ybQoyHKX3PfmgjLJPmRLHSxSWT1SsB10zsmYSh6tc+kW80ILelYJGH+Gg== <- content-length: 144 <- date: Mon, 24 Apr 2017 19:35:41 GMT

pablobarbera commented 7 years ago

@jpw82 This looks like the same issue in #126. I'll close this for now and focus the discussion there.