Simplifying Twitter APIs by leveraging tweepy APIs.
- Getting Twitter developer account. For registration
- Install Pandas package.
- Install Numpy package.
- Install Tweepy package.
# packages installation "In terminal"
conda install pandas
conda install numpy
pip install tweepy
# importing packages in your jupyter notebook
import pandas as pd # Please use the abbreviation "pd"
import numpy as np # Please use the abbreviation "np"
import tweepy
# how to install easytwitter package
pip install easytwitter
- Import module
# use * to access all the objects
from easytwitter import *
- First your should establish the connection
# returns 4 inputs to validate your twitter tokens.
Auth.connect_me()
# consumer_key = "xxxxxxxxxxxxxxxxxxxx"
# consumer_secret = "xxxxxxxxxxxxxxxxxxxxxxx"
# access_token = "xxxxxxxxxxxxxxxxxxxxxx"
# access_token_secret = "xxxxxxxxxxxxxxxxxxxxxxx"
Returns a summary of the latest 20 tweets of a specific twitter account.
# if you want to interact with the data, store it in a new dataframe
df = Api.get_user_timeline()
df.head()
Returns a user's followers details.
df = Api.get_followers_details()
df.head()
Returns the 20 most recent mentions, including retweets.
df = Api.get_mentions_timeline()
df.head()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.