Code Monkey home page Code Monkey logo

Comments (8)

daroczig avatar daroczig commented on June 29, 2024 2

Sorry for the delay with my reply, this is a pretty busy week -- will look into your other ticket as well (but probably only next week). As a quick resolution for this, I suggest to do the auth on localhost as described at https://github.com/cardcorp/fbRads#creating-a-facebook-app--connect-with-oauth-token, then you can save the token and transfer to the server.

from fbrads.

simran-k avatar simran-k commented on June 29, 2024

@daroczig : Hey, Thanks for reviewing the problem. I of course went for the solution but since it more or less feels like a hack, I would still like to know a concrete solution for the problem. That would be much appreciated.

from fbrads.

simran-k avatar simran-k commented on June 29, 2024

@daroczig : Hi, So now, how do I refresh the token? My last token expired and now I am facing the same issue

from fbrads.

daroczig avatar daroczig commented on June 29, 2024

Just replied on #38. Sorry, I'm still pretty busy with other things and I still consider this ticket to be not highly related to the R package but rather to infra and how you set up your FB ads analytics environment, so could not dedicate much time into looking into the case how to auth in a server environment that you use from a client via a web browser. I hope you understand it. I'm not closing the ticket, as I might have some time later to come up with a hack for this, but no promises for the near future.

Again: you can generate the token on your localhost and copy it to the server. With standard access to the API, you can use non-expiring tokens as well, so this is a once time task.

from fbrads.

simran-k avatar simran-k commented on June 29, 2024

"With standard access to the API, you can use non-expiring tokens as well, so this is a once time task.", I believe I am using it but the token has expired after a couple of months. Am I missing out on something here?

from fbrads.

daroczig avatar daroczig commented on June 29, 2024

@bjeavons do you know top of your head how to create a non-expiring token?

from fbrads.

bjeavons avatar bjeavons commented on June 29, 2024

https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension details it but in short: Use a short-lived user token, your app ID and app secret to call from your server

GET /oauth/access_token?  
    grant_type=fb_exchange_token&           
    client_id={app-id}&
    client_secret={app-secret}&
    fb_exchange_token={short-lived-token} 

from fbrads.

daroczig avatar daroczig commented on June 29, 2024

Closing this, as I think getting a long-live token resolves the problem much better then trying to figure out how to auth with a local browser client and remote R session

from fbrads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.