In this lesson you will learn how to set the correct permissions for your twitter application and how to get the tokens you need to instantiate the twitter client from twitter
library.
Dimitri Ivashchuk: [0:00] We are now in the app that we have created previously. We will need to do couple of things to actually start working with Twitter-node library. First of all, we want to have a look at the permissions.
[0:15] Now, we have read and write, which means our API will be able to both read the data about the user. In this case, our user, which we are logged in now because we will not be using sign in this Twitter to allow other users to log in into our application.
[0:34] For the purposes of this tutorial, to make it simple, we won't be writing any data to Twitter. We won't be following somebody, we won't be posting any tweets. We will just read the information about the current login user, in this case, me or you, in your case.
[0:49] We want to press Edit, and set the flag to Read-only. We save it. Then, we need to go to keys and tokens. Here, you will see that you have your API key and your API secret key. Those are both used in the Twitter library.
[1:10] We need to add something else. We need to generate the access token and access token secret. Those are usually generated when somebody is using sign in with Twitter or any other OAuth implementation, but in this case, we will just generate them here for the ease of use.
[1:26] Press Generate. I will copy those. Those are saved in my clipboard. I will use them later on. I will be pasting them into the library. That's it. We can jump into the node-server.