You might have seen some people using completely different source labels like Gucci SmartToilet, if you are also interested to change it for your tweets, just follow the steps below.
Twitter Source Label comes from the app you are using like Twitter for iOS, Flamingo for Android, Twitter Web App, etc. So you need to create your own twitter app to change the source label. But no worries, it is an easy process. All you need to do is get verified from Twitter and create an app using python with the Twitter APIs they provided.
The process may take around 20 – 30 minutes, but once done, you can tweet as many times as possible or even create multiple apps within a few minutes. And the best part is it is not as hard as it sounds, anyone can do it easily. But there are two limitations, you can only post text (no support for videos or images) and you cannot create the app name which is already existed like Twitter Web App. With that out of the way, let’s get started.
How to Change the Twitter Source Label
To create your own Twitter app, navigate to the Twitter Developer website, and log-in with your Twitter account. Now you can see an option called ” Create an app” at the top right corner, just click on it.
You will be redirected to a page where you can get verified to access Twitter APIs. Nothing serious here, just fill out the form with details about ‘what you want to do with their API’. You will be redirected to four forms, one form after another, complete them, and agree to the developer terms and conditions, and submit the application. This process may take like 10 minutes and you will get a verification email instantly once you submitted the form.
Open the mail and click on the “Confirm your email” button in the email send from Twitter Developer Accounts. Once done, you will be redirected to the Twitter developer page again; you can close it.
Now open this link, scroll down and in the standalone apps section, click on (+ Create app) button.
Give your app a name; remember that this name will be shown on your tweets as a source label. You cannot name your app with an already existing name like Twitter for Android or something. So give it a special name and click complete.
Now you can see your app APIs, just scroll down and click on “App settings” to make few tweaks.
Now scroll down to the App permissions section and change the option from “Read” to “Read and Write” and click on Save.
And scroll down to Authentication settings and turn on 3rd party authentication. It also asks for your website link; you can use your Instagram profile or your twitter profile if you want. Then click on Save.
Now scroll to the top, and click on the option called ” Keys and Tokens.” Click on it and there you can see your Twitter API keys and Access Tokens by click on the “view keys” button and “generate” button, respectively. These will be useful later; keep this tab aside.
Now you have access to Twitter APIs, to create a Twitter app, you need to download Python. Open the Python website and download the python for your OS.
Open the downloaded Python file and install it just like you install any software. Once done, close the installer.
Now, open the file location of where you have installed python. If you haven’t changed the installation location, you can find it here:- C:\Users\”YourUserName”\AppData\Local\Programs\Python\Python38-32. Now open the Scripts folder and copy the complete location. It should now look like this
Tip:- If you don’t see the folder called “AppData” in your user account. Just type “\AppData” at the end in the location bar and it will open it.
Now, Open Command Prompt, and type cd, give space and paste your python file location and click enter
Now type this command and click enter
pip install tweepy
Once installed, close the command prompt. Now in the python scripts folder, right-click and click on New > text document to create a new document.
Now open that document and paste this code inside
import tweepy auth = tweepy.OAuthHandler("CONSUMER KEY HERE", "CONSUMER KEY SECRET HERE") auth.set_access_token("ACCESS TOKEN HERE", "ACCESS TOKEN SECRET HERE") api = tweepy.API(auth) tweet = input(" ") api.update_status(status =(tweet)) print ("Done!")
That code will be only useful to post tweets with only text. If you want to add images, gifs, videos to your tweet, add another line to your code and paste this code instead.
import tweepy auth = tweepy.OAuthHandler("CONSUMER KEY HERE", "CONSUMER KEY SECRET HERE") auth.set_access_token("ACCESS TOKEN HERE", "ACCESS TOKEN SECRET HERE") api = tweepy.API(auth) tweet = input("") image="C:\Users\ravit\Downloads\AppSheet_Logo" #Enter image location api.update_with_media(image, tweet) print ("Done!")
Now replace the placeholders with your twitter APIs. Remember that there are 4 APIs to change – API Key, API Secret Key, Access Token, and Access Token Secret. Once done, it should look like this
Now save the file and name it anything, but change the save as type to “All files” and add “.py” at the end of the file name to save it as a python file and click save. Look at this image for example.
Now open that Py file you just made. That’s it; you can type anything here in this command line and click enter. It will be tweeted as a new tweet. You can use this py file to tweet as many times as you want.
If you have any problems, do let us know in the comments below.