Last active
December 19, 2018 03:35
-
-
Save ryanmcgrath/70f8e46f4e2cea5e45f5044e79bafe63 to your computer and use it in GitHub Desktop.
Revisions
-
ryanmcgrath revised this gist
Dec 19, 2018 . No changes.There are no files selected for viewing
-
ryanmcgrath created this gist
Dec 19, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ # pip install twython to get this library from twython import Twython # Create a new App at https://dev.twitter.com/, check off "sign in via Twitter", and get your tokens there twitter = Twython('Consumer API Key', 'Consumer API Secret', 'Access Token', 'Access Token Secret') # Read and upload the image, see image guidelines in post above~ image = open('path/to/image.png', 'rb') twitter.update_profile_image(image=image)