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

Issues with token #125

Closed vivek14632 closed 7 years ago

vivek14632 commented 7 years ago

fb_oauth <- fbOAuth(app_id="***",app_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. fb_page <- getPage(page="subway", token=fb_oauth,n=10,feed = T,reactions = T) Error in callAPI(url = url, token = token) : An access token is required to request this resource.

Noted: I have put '*' instead of credentials for the security reasons.

ThomasWilli commented 7 years ago

I do have the same problem. getPost does work, but getPage is somehow broken... I tried to figure out why but I fail modyfing the original function.

elliothimmelfarb commented 7 years ago

I am also having the exact same issue

vivek14632 commented 7 years ago

Here is one solution i found which is working for me.

Get an app token following this URL: https://developers.facebook.com/tools/explorer

In Application box, select your app and click on 'Get token' and select 'Get App token'. You will get your token. Use the following code to get page.

new_token<-"YOUR NEW TOKEN" getPage(page='page_name', token=toString(new_token),n=100,feed = T,reactions = T)