Skip to content

Instantly share code, notes, and snippets.

@Xyborg
Forked from KonradIT/tweet_from_fridge.py
Created August 15, 2019 13:50
Show Gist options
  • Select an option

  • Save Xyborg/501633c49e6950cd55ed0030995300b3 to your computer and use it in GitHub Desktop.

Select an option

Save Xyborg/501633c49e6950cd55ed0030995300b3 to your computer and use it in GitHub Desktop.

Revisions

  1. @KonradIT KonradIT created this gist Feb 16, 2019.
    23 changes: 23 additions & 0 deletions tweet_from_fridge.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/usr/bin/env python
    import sys, os, time
    import tweepy
    keys = dict(
    consumer_key='_YOUR_CONSUMER_KEY',
    consumer_secret='_YOUR_SECRET_KEY',
    access_token='_YOUR_ACCESS_TOKEN',
    access_token_secret='_YOUR_ACCESS_TOKEN_SECRET'
    )

    user = "@YOUR_USERNAME"

    auth = tweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret'])
    auth.set_access_token(keys['access_token'], keys['access_token_secret'])
    api = tweepy.API(auth)

    def tweet():
    message=input("tweet: ")
    api.update_status(message)
    time.sleep(1000)
    if __name__ == "__main__":
    while 1:
    tweet()