How to Tweet From Pretend Devices
How to tweet from ‘Twitter for Samsung Smart Fridge’ and etc.
Now, you’ve probably seen a ‘teen’ going viral for tweeting from her fridge, ‘LG Smart Refrigerator’ when ‘her mother took away her phone’. Alas, but that was plain fake — no LG Smart Refrigerators 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 in OR use a website.
Using a website
I am starting with this as this is a less time-consuming process. Go to TweetFrom and click the link on the bottom.
Paste the keys you already have, type your tweet and press ‘Tweet’.
Running your code
You can get Python/IDLE, for example, to create your script. Now you have to go into command prompt and type ‘Pip install Tweepy’. Wait for it to finish downloading the library. If you are having problems on Windows at this stage, it may help to watch this video. If you are having problems on Mac, it may help to read this.
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.
import tweepy
# 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)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
# Write a tweet to your Twitter account
tweet = ‘Hello, world!’
api.update_status(status=tweet)
5. Enjoy.
Well done! Thank you for reading this, hope it worked and you can tweet from any ‘device’ you want. If you did everything properly, you would end up with something like this.
Source: this is a bit more detailed guide, which was first published by K0902 on Reddit.