Print Friendly and PDF
This is the simple program for twitter post analysis Note: First Install Library tweepy into your Pc than run it

This is the simple program for twitter post analysis in this program analysis latest tweet on twitter 

Note: First Install Library tweepy into your PC than run it

Program :

import tweepy
from textblob import TextBlob
consumer_key='t4kfKNpNLojrcLD5BQVJsZ6FV'
consumer_secret='izwKDPBjeZAUCcKFjhU9F7EUFYVQaieTSMsSg0cJLb3zNcbNhW'
access_token='2444042389-BLj6mrSj2k1HfGWnJMDAp92yXmIuPjGwitZ8NHk'
access_token_secret='jvcDI5GjW69tteEG816e4OA1wpOR04hz277mmqUnO9hQT'
auth=tweepy.OAuthHandler
auth=tweepy.OAuthHandler(consumer_key,consumer_secret)
auth.set_access_token(access_token,access_token_secret)
api=tweepy.API(auth)
public_tweets=api.search('@twitterusername') #like Zubairsaif700
for tweet in public_tweets:
    print(tweet.text)
    analysis=TextBlob(tweet.text)
    print(analysis.sentiment)

zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: