-
Notifications
You must be signed in to change notification settings - Fork 57
Getting remote oauth token from facebook whilE IN R studio server #17
Comments
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. |
@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. |
@daroczig : Hi, So now, how do I refresh the token? My last token expired and now I am facing the same issue |
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. |
"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? |
@bjeavons do you know top of your head how to create a non-expiring token? |
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
|
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 |
What is
error on facebook.
I have opted for out of band authentication and thus I have to point my browser to the url:
https://www.facebook.com/dialog/oauth?client_id=611685395673327&scope=ads_management&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code
in order to get my authorization code.
Where did I go wrong?
What exactly do I need to pass into redirect_uri in the facebook application?
Since I am using R studio server, it is http://localhost:1410/ when one is working locally but it wont work with remote server.
A relevant post:https://support.rstudio.com/hc/en-us/articles/217952868-Generating-OAuth-tokens-from-a-server
The text was updated successfully, but these errors were encountered: