Skip to content

Tirth27/Tweepy-Oauth-in-Django-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tweepy-Oauth-in-Django

Twitter authentication using Tweepy API and can Post and see HomeTimeline tweets using Django.

Extending the concept of our Curse-Word-Detection-For-Twitter repository you can see the homeline tweets and can post tweets.

Install Dependencies

pip install tweepy
pip install Django==1.9
pip install profanityfilter

Generate your Twitter Credential if you dont have one from Twitter Application Manager, And Set the Callback URLs in Settings of Twitter Application Manager to

http://127.0.0.1:8000/callback/

How To Use

  1. Clone the repository
git clone https://github.com/Tirth27/Tweepy-Oauth-in-Django-.git
  1. Generate your CONSUMER_KEY and CONSUMER_SECRET form Twitter Application Manager found under Keys and Access Tokens section. And paste the CONSUMER_KEY and CONSUMER_SECRET in util.py

  2. Run the django server on localhost

python manage.py runserver

You will see the homepage in the you browseralt text

Clicking on Sign in with Twitter will take you to twitter authentication page to authorize appalt text

Once you have authorize you app it will redirect you Info page on your localhostalt text

Clicking on Goto to Timeline will fetch your Hometimeline tweetsalt text

Clicking on Goto to Post will take you to post_tweet page where you can post tweets.

Here we have apply the Profanity-Filter which does not allow user to use profane words in the tweet. If user tries to use the profane words in the tweet, it won't allow user to post the tweet on twitter and shows Explicit Contect detected ! Please try again. error message.

alt text

Next Steps

  1. Rather then using the Profanity-Filter use the Natural Language Processing to detect Explicit or Profane words in tweets.

  2. Display the HomeTimeline tweets in more readable way with the user name, user profile image and user tweets

  3. Perform the Sentiment Analysis on each tweets using TextBlob. The label should be either 'Positive' or 'Negative'. You can define the sentiment polarity threshold yourself, whatever you think constitutes a tweet being positive/negative. And display tweets with its polarity in the HomeTimeline page.

Credits

The credit for this project goes to @github/Tirth27 and @github/PatrioticParth

About

Twitter authentication using tweepy and can post and see hometimeline tweets using Django

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published