The Twitter AutoPoster tool is a downloadable PHP application (app). The app automatically posts tweets to your Twitter account:
1. Download the app ZIP file
2. Unzip the app ZIP file to your computer.
3. Edit the settings in the config.php file:
- Regarding the Twitter settings, you need to create an app
first. Set app Access Level to "Read and write". Once you have created the app, you
will see values to use for Twitter Consumer Key, Twitter Consumer Secret, Twitter Access Token, and Twitter Access Token Secret under the [Keys and Access Tokens] tab.
- Regarding the Bitly settings, you need to Create an Bitly OAuth Application
. Once created and registered, you can click on the
[Generic Access Token] button to generate the Bitly Access Token.
- Regarding the mySQL settings, see (4) below.
4. Upload files to web server in a separate directory.
5. Create a database for the Tweets which the app will autopost. Note the mySQL Host, mySQL Username, mySQL Password, and mySQL Database Name. You will use these in config.php. Via phpMyAdmin, run the following SQL query:
CREATE TABLE IF NOT EXISTS `tweets` (`id` int(11) NOT NULL AUTO_INCREMENT,`url` varchar(500) NOT NULL,`post` varchar(140) NOT NULL,`media` varchar(300) NOT NULL,PRIMARY KEY (`id`),KEY `id` (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
6. Populate the database via phpMyAdmin:
- In the URL field, enter the URL to include in Twitter post. The URL is automatically shortened via Bitly. This field is optional. If no URL supplied, it is ignored and not included in the Twitter post.
- In the Post field, enter the text of the Twitter post. This field is required.
- In the Media field, enter URL or the full server path of the media file (image or video) to include in the Twitter post. The media file is uploaded to Twitter. This field is optional. If no Media supplied, it is ignored and not included in the Twitter post.
For example: /home/yourdomain/public_html/images/image.jpg or http://www.yourdomain.com/images/image.jpg
The Bitly shortened URL is 23 characters long. The maximum length of Twitter posts is 140 characters. So, your Post must factor in URL. For example, if you enter URL, Post can only be 117 characters long:
140 - 23 = 117. The app automatically truncates the Post to keep the length of the post 140 characters or less.
7. Lastly, you need to create a server cron job to automatically execute the updater.php file at preset times. For example, every 30 minutes. Typically you can do this via a server control panel like cPanel. If you cannot do this yourself,
ask your web host to do it. We do not recommend setting interval at less than 15 minutes.