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

http://localhost:1410/ no longer supported by Facebook API #180

Open 123worldtraveller opened 6 years ago

123worldtraveller commented 6 years ago

Facebook no longer supports http, especially for new app started from March 2018 onwards.

fbOAuth() will display the following error: Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://

image

In R, the following error is resulted.

Error in oauth2.0_access_token(endpoint, app, code = code, user_params = user_params, : Bad Request (HTTP 400). Failed to get an access token.

How can we use https instead of http?

It seems that by default, RFacebook uses http? Copy and paste into Site URL on Facebook App Settings: http://localhost:1410/

pablobarbera commented 6 years ago

I'm working on fixing this, but it doesn't seem to be easy... In the meantime, here's two temporary solutions:

1 - You can go to https://developers.facebook.com/tools/accesstoken/ Then choose the app you created and then select Debug. In the new page, go all the way down to Extend Access Token. You can then use the token as a regular long-lived token, e.g.:

token <- 'XXXXX' 
getPage("BarackObama", token=token)

2 - Short-lived tokens obtained from https://developers.facebook.com/tools/explorer/ should still work.

Thanks for your patience!

Yael-Shi commented 6 years ago

Hi, I am happy to see that someone asked about it already, and that you are on it :)

anyway, I still have the same issue- and I got this: capture

Both with the Shot and Long live. Do you have any idae? (It is a little bit urgent)

Thanks!!

IgorPaim commented 6 years ago

the problem is that the post is passing to facebook "http" or instead of "https" and to get https you must install an SSL certificate and run apache

Yael-Shi commented 6 years ago

Thanks. Could you please explain a little more about how to do that?

Schonhorst commented 6 years ago

I had the same problem. Do you have any way to fix this?

ananthnann commented 6 years ago

Having a similar problem to @Yaelshi, though my error is a little different.

r error

ARM160 commented 6 years ago

Has there been any update on this? @pablobarbera

ele6 commented 5 years ago

use https://ngrok.com/docs

Didiergrimaldi commented 5 years ago

hello, do you have a solution for the https issue? @pablobarbera thks

g13wm commented 3 years ago

Hello has anyone found a workaround for the InstaOauth in the instaR package?