def gif_tweet():
try:
# takes a file location and a text string to update status
api.update_with_media('../img/pulp-fiction-search.gif','BEHOLD, a gif')
# if there's an error, catch it instead of crashing and print out the error message
except tweepy.TweepError, e:
print 'Error sending tweet:', e[0][0]['message']
# utility function for retrieving secret keys
# from our secret key file
评论列表
文章目录