How to store the Access token in R for the Facebook Ad Library?

Viewed 28

I´m trying to use the Facebook Ad Library API to get much needed data for my thesis. I´m completely new to using APIs. I already did the following steps: created an Facebook account, verified my ID, created an developer account, created an APP. Additional information: I´m using the Radlibrary package. So before writing my query and getting the data, I somehow need to store my access token for the library in R. What I was trying to do was:

  1. running adlib_setup()
  2. typing in my App-ID + Secret
  3. running adlib_set_longterm_token() to get a longterm access and not only for 2 hours
  4. added my short lived access token + pressed ENTER

And this is where my problem starts: I´m always getting an error message: Error-message

when I enter token_get() it tells me that there is no existing token.

I have no idea how I could solve this problem. The App-Secret is the one I copied from the settings for my APP. Is there another way to store the token? Thanks for the help in advance!

0 Answers
Related