DEV Community

Discussion on: Many bot accounts using 1 Twitter Developer account

Collapse
 
a7mdeno profile image
a7mdeno

Hello, I received the Access Token and Secret Token of my bot account, but in order to link my bot with my dev account, I still can't figure out where should I put them in? I tried to edit the ones in my dev account, but it can only be generated automatically. Sorry I'm a total beginner.

Collapse
 
randomjkbn profile image
random

To use the Twitter API, u will need to use 4 variables - consumer_key, consumer_secret, access_token, access_token_secret in your bot program(which could be in Python(tweepy library is pretty famous), JavaScript or any language of ur choice).

  • consumer_key and consumer_secret should be the keys from the standalone app which is created from Twitter developer account.
  • access_token and access_token_secret should be the keys you obtain after running the nodejs program and visiting localhost:3456 (while logged into the bot account).

This blog only explains about how to get these 4 keys not about how to create a Twitter bot. (There are plenty of resources available online for creating a Twitter Bot)

Hope this helps!

Collapse
 
randomjkbn profile image
random • Edited

On a side note, I made my first twitter bot with the help of this video.
youtube.com/watch?v=W0wWwglE1Vc

However, this will tweet directly into your Twitter handle which is a developer account. If u want another Bot account that is different from your Developer account, u have to obtain access_token and access_token_secret keys in the method mentioned in the blog post and change these 2 lines of code.