NOTICE: If you are using an older version than 2.1 of PhantomBot it will only be able to read posts. We will not be re-enabling the post feature on that Twitter Application Account. We may even completely retire the account at some point.
As the PhantomBotApp Twitter account was locked from posting, and after having a discussion with Twitter, it was decided that the best way to provide Twitter service, particularly the ability to post, is to have individuals register applications that they are responsible for.
We are providing all the proper restrictions within PhantomBot to help ensure that people are not post-banned, and that being said, we do not recommend circumventing any of the limitations within PhantomBot for Twitter. While we understand that you may find it inconvenient to not be able to use hash-tags or mentions, Twitter has automated systems which detect this from applications and those systems can automatically suspend accounts. We have had personal experience with the appeals process after this happened, and it was not the easiest process to go through. Again, we do not wish to have anyone suspended or post-banned, so, we have made the decision to strip these out from posts. We apologize for any inconvenience this may cause.
That disclaimer aside, these are the steps that you must complete to register your own application and install the keys into PhantomBot to be able to read and post Tweets.
Creating Your Own Twitter Application
First, you will need to register your own Twitter application. To do so, proceed to the following URL:
Click on Create New App.
On the following screen, enter in details for your application. You may name the application the same as your Twitch bot account; e.g. if you named your Twitch bot ‘FooBot’ name the application ‘FooBot.’ It is suggested that you indicate in the description what this application is, the text provided is probably sufficient enough to explain to Twitter what the application is if they ever review your application. If you do not have your own URL, note that they say that a placeholder will work, so enter a placeholder URL. Since you will not be making your application public, this should be a non-issue:
Scroll down, read the Developer Agreement with Twitter, select the Yes, I agree checkbox, and click on the Create your Twitter application button.
On the next screen, click on the Keys and Access Tokens tab and take note of your Consumer Key and Consumer Secret keys, these will be used when configuring PhantomBot:
Next, scroll down and click on the Create my access token button:
This will generate API keys, take note of these as well, they are also used when configuring PhantomBot:
Configuring Keys in PhantomBot
From your PhantomBot console, run
twittersetup which will ask you for your Twitter username and keys. Note that this will shutdown PhantomBot once completed!
Warning: Do not show your keys to anyone. This is like your Twitter password, if someone gets it they can post on your Twitter.
twittersetup [06-28-2016 @ 21:09:02.098 MDT] PhantomBot Twitter setup. Get your 4 Twitter keys from: https://apps.twitter.com/ Please enter your Twitter username: YourTwitterUserName Please enter your consumer key: consumer_key_here Please enter your consumer secret: secret_key_here Please enter your access token: access_token_here Please enter your access token secret: access_token_secret_here
If you run your bot as a service, then modify the botlogin.txt file directly and restart PhantomBot:
twitterUser=YourTwitterUserName twitter_consumer_key=consumer_key_here twitter_consumer_secret=secret_key_here twitter_access_token=access_token_here twitter_secret_token=access_token_secret_here