Skip to content

Instantly share code, notes, and snippets.

@pinfort
Last active November 3, 2017 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pinfort/9554d81f4415c1741f666e6b06200d27 to your computer and use it in GitHub Desktop.
Save pinfort/9554d81f4415c1741f666e6b06200d27 to your computer and use it in GitHub Desktop.
import os
import tweepy
class Tweet(object):
"""
use tweepy
"""
def __init__(self):
consumer_key = os.environ.get("TWITTER_CONSUMER_KEY")
consumer_secret = os.environ.get("TWITTER_CONSUMER_SECRET")
access_token = os.environ.get("TWITTER_ACCESS_TOKEN")
access_secret = os.environ.get("TWITTER_ACCESS_SECRET")
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
self.api = tweepy.API(auth)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment