Twitter source label alerts the user about the app you are using to post the tweets and appears right next to the date and time stamp. You might have seen some people using completely different source labels on Twitter. 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. In order to change the source label of your tweets, you need to create your own Twitter app. The process may take around 20 – 30 minutes, but once done, you can tweet as many times as possible.
How to Change the Twitter Source Label
The steps are easy to follow if you pay attention to the guide but a little lengthy. Once you are done with the initial setup, I promise subsequent posting of tweets won’t take more than a few moments.
1. To create your own Twitter app, navigate to the Twitter Developer website, and log in with your Twitter account by clicking on the sign-in button at the top right.
2. Then click on the Developer Portal option beside it.
3. On the next page, fill out the form with details such as your use case, resident country, etc. This process may take like 10 minutes but you will get a verification email instantly once you submitted the form.
4. Click on the Confirm your email button in the email sent from Twitter Developer Accounts. Once done, you will be redirected to the Twitter developer page again.
5. Once approved, click on the Developer Portal option again to open the developer portal. Here, click on the Projects and Apps tab in the sidebar and select Overview.
6. Now scroll down to the Standalone Apps section and click on Create App.
7. 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 existing name like Twitter for Android or a name that is being used by another app. So give it a unique name and click Next at the bottom of the page.
8. Now you will see your newly created app’s APIs under Keys & Tokens. Just click on App settings at the bottom right to make a few tweaks to your app.
9. On the next page, under User authentication settings, click on the Set up button beside the Authentication not setup heading.
10. Now enable OAuth 1.0a on the next page.
11. Now scroll down to the App permissions section and change the option from Read to Read and write.
12. Then again scroll down and enter your Twitter profile link under Redirect URL and Website URL. Once done, click on Save button at the bottom of the page.
13. Once the authentication is turned on, go to Keys and Tokens tab at the top. Here you will find API keys and API Tokens.
14. Just click on the Regenerate and Generate buttons respectively to create a fresh API key, API Key Secret, Access Token, and Access Token Secret. Copy and save these 4 keys aside as they will be useful later.
15. 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.
16. Open the downloaded Python file and install it just like you install any software. Once done, close the installer.
17. Now, open the file location where you installed python. If you haven’t changed the default installation location, you should find it here:
Now open the Scripts folder and copy the complete location. It should now look like this. You can also replicate the same process on Mac.
Tip: If you don’t see a folder called AppData in your user account, type \AppData at the end in the location bar and it will open.
18. Open Command Prompt or Terminal on Mac and type cd, give space, and paste python file location you just copied, and press Enter.
19. Now type the command below to install Tweepy and press Enter.
pip install tweepy
20. Once installed, close the Command Prompt. Now in the python scripts folder, right-click and click on New > Text document to create a new text document.
21. Now open that document and paste the code below inside and save the file.
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!")
The above code will be useful to post tweets with text only. If you want to add images, gifs, or videos to your tweet, add the image line to your code and paste this code instead. Replace the IMAGE LOCATION HERE with the actual location of the image in your local storage.
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="IMAGE LOCATION HERE" api.update_with_media(image, tweet) print ("Done!")
If you need to reply to a tweet, use the below code. Replace the TWEET ID HERE with the id of the tweet you want to reply to.
For example, in the below Twitter tweet URL, 1537326974519382017 is the tweet id.
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(tweet, in_reply_to_status_id = TWEET ID HERE) print ("Done!")
22. 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. If you are adding an image or replying to another, don’t forget to change those placeholders too as mentioned above. Once done, it should look like this
23. Now save the file and name it something that you will remember, but update the Save as type field 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 the screenshot below for more clarity.
24. Now open that Py file you just created. That’s it. You can now use this to tweet or reply to a tweet in the format we discussed above. You can use this py file to tweet as many times as you want.
Change Twitter Source Label
It is a pretty cool hack but it is more than that. If you are creative, you can use it to promote your brand, product, and whatnot. The initial setup process is lengthy but once you have the py file ready and functioning, you just need to update a few lines of code with data like tweet id and you are good to go. Try it a couple of times and you will get the hang of it.
Also read: Best Twitter Tools Useful for Every Twitterati Out There