Skip to content

Instantly share code, notes, and snippets.

@pierwill
Last active May 4, 2018 18:09
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 pierwill/0ee84f7976e773023fda278702490030 to your computer and use it in GitHub Desktop.
Save pierwill/0ee84f7976e773023fda278702490030 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# run as a cron job (every 24 hours?)
# the longer you wait, the longer the chain
import tweepy
from secrets import consumer_key, consumer_secret, access_token, access_token_secret
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
daisy = (api.me()).screen_name
status = api.user_timeline(user=daisy, count=1)[0]
api.update_status('daisy chain ' + 'https://twitter.com/' + daisy + '/status/' + status.id_str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment