Users can create their personal access token in two different ways. Each method is outlined below.
2. Access token/secret method
- Click the tab labeled
Keys and Access Tokens to retrieve your keys.
- In the
Keys and Access Tokens tab, locate and copy/paste values Consumer Key (aka “API Key”) and Consumer Secret (aka “API Secret”) into an R script.
- In the
Keys and Access Tokens tab, scroll down to Token Actions and click Create my access token.
- That should generate two access keys
Access Token and Access Token Secret
- Locate and copy/paste
Access Token and Access Token Secret (fake keys shown in image above) into an R script file
- Once the keys are read into R, pass the objects to
create_token(), and store the output as twitter_token.
- The
create_token() function should automatically save your token as an environment variable for you. To make sure it worked, compare the created token object to the object returned by get_token()
That’s it!