django-admin-twitter

Manage twitter from Django admin interface


License
GPL-3.0
Install
pip install django-admin-twitter==0.1

Documentation

django-admin-twitter

Manage twitter from Django admin interface

##Description django-admin-twitter allows you to interact with twitter in a semi-automated way. You can reply, favourite or follow by searching the twitter timeline based on keywords. If you want a fully automated way to interact with your timeline you should take a look at TwitterFollowBot.

##Disclaimer

I hold no liability for what you do with this administration interface or what happens to you by using it. Abusing the Twitter API can get you banned from Twitter, so make sure to read up on proper usage of the Twitter API.

Do not mass reply, favorite or follow using this interface to avoid being banned from Twitter!

##Dependencies

You will need to install Python's python-twitter library:

pip install twitter

You will also need to create an app account on https://dev.twitter.com/apps

  1. Sign in with your Twitter account
  2. Create a new app account
  3. Modify the settings for that app account to allow read & write
  4. Generate a new OAuth token with those permissions

Following these steps will create 4 tokens that you will need to place in settings.py as discussed bellow.

##Installation

  • Copy the admin_twitter to your project's directory
  • Add admin_twitter to INSTALLED_APPS on your settings.py
  • Add OAUTH_TOKEN , OAUTH_SECRET , CONSUMER_KEY and CONSUMER_SECRET to your settings.py (follow the instructions on the Dependencies section)
  • Copy updatebutton.js to your static directory
  • Update your db (manage.py makemigrations;manage.py migrate)

##Usage

  • On your admin interface under the Admin_Twitter section you will find the 3 components of admin_twitter:

  • Authors - Users from who you have fetched tweets

  • Messages - Messages that can be sent to users

  • Tweets - List of fetched tweets

  • To start using Admin_Twitter go to Tweets and press Update Tweets (If you can't see the button on the top right corner, check that updatebutton.js is being correctly loaded). You'll be asked for the search pattern for the tweets and the corresponding tweets will be added to Tweet list and the corresponding users will be added to the Author list.

  • From the Tweet list you can favourite tweets or reply to tweets - a random Message will be used for each reply (make sure to have at least one active message on the Message list) by selecting the Tweets and using the dropdown menu.

  • From the Author list you can follow users by selecting them and using the dropdown menu.

  • Once you are done with the last tweets you fetched you can archive them and hide all archived tweets by using the filters. All tweets are kept so that you don't risk replying to the same tweet more than once.

##Limitations / TODO

  • Add rate limiting
  • Add tests