How to tweet from ‘Twitter for Gucci Smart Socks’ and etc.
Now, you’ve probably seen such tweets going viral where one is tweeting from the fridge, ‘LG Smart Refrigerator’ when ‘her mother took away her phone’, Gucci Smart Socks, and many more. Alas, but that was plain fake — no Gucci Smart Socks have Twitter clients. At least yet.
Good thing is — anyone can do that. From pretty much any device you can think of. The following steps will show you how.
1. Get an active Twitter account.
This should go without saying and hopefully if you are reading this, you already have one in your possession. Otherwise, follow this.
2. Now get a developer account. Don’t worry, it’s easy.
You will be creating a new ‘device’ — to do that you should go to the Twitter Developers Page. Click on ‘Apply’ in the upper right corner and click on ‘Apply for a developer account’ button.
You will now have to fill out a simple form. Twitter will ask you about your primary reason for using its developer tools. You can go with ‘Hobbyist’ or ‘Other’, for example. Note that you will have to verify your phone number for you account. You will also be asked how you will you use the Twitter API (200 characters), just keep it simple. Now review and submit your application. This is a relatively quick process, once you get your account approved, you can continue.
3. Create a Twitter application.
When your Twitter developer account is approved, go back to Twitter Developers Page and find ‘Apps’ in the droplist under your name. You can now create an app. Fill out the required fields and create an app. Do not allow this application to be used to sign in with Twitter.
Now go to ‘Keys and tokens’ section and to get your keys and tokens. Copy them as you will need them for your using in your script below or on the website.
4. Get something you can run your code. Python/IDLE (this is the one I used to create the script)
Now you have to go into command prompt and type ‘Pip install Tweepy’. Wait for it to finish downloading the library.
Go to your Python editor and paste this code. You will need to replace the ‘key’ and ‘token’ variables with your keys and tokens you have copied earlier. To change your tweet contents just change “tweet = ‘Hello, world!’” into “tweet = ‘Whatever you want’”. Now run your code and see your result in your Twitter account.
# Create variables for each key, secret, token
consumer_key = ‘your_consumer_key’
consumer_secret = ‘your_consumer_secret’
access_token = ‘your_access_token’
access_token_secret = ‘your_access_token_secret’
# Set up OAuth and integrate with API
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
api = tweepy.API(auth)
# Write a tweet to your Twitter account
tweet = ‘Hello, world!’
Well done! Thank you for reading this, hope it worked and you can tweet from any ‘device’ you want.