You might have seen some people using completely different source labels.
Well, today we will see how to change the Twitter source label
First, we need to have a Twitter developer account, if you don't have.
1) Just navigate to Twitter Developer website
2) Just fill out the form with details about ‘what you want to do with their API’. This process may take like 10 minutes and you will get a verification email instantly once you submitted the form.
After getting approval from Twitter. Now we can create an app
1) Open this link and click on "create app"
2) Give your app a name and this name will be shown on your tweets as a source label. And you can't name an app which is already present.
3) Next, you will be redirected to API keys, tokens and click on "App Settings"
4) Now scroll down to the App permissions section and change the option from “Read” to “Read and Write” and click on Save.
5) 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.
Then click on Save.
6) 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.
7) Now you have access to Twitter APIs, to create a Twitter app, you need to download Python.
8) Now, open the file location of where you have installed python and navigate to "Scripts" folder
C:\Users\"YourUsername"\AppData\Local\Programs\Python\Python37\Scripts
9) Now, Open Command Prompt, and type cd, give space and paste your python file location and click enter
cd C:\Users\"YourUsername"\AppData\Local\Programs\Python\Python37\Scripts
10) Now type the command and hit enter
pip install tweepy
11) 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.
12) 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!")
If you want to tweet with a media file like photo or video, you can use the below code
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/facadmin1/Downloads/introdev.PNG" #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
13) 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.
14) Now open that .py file you just made. That’s it, you can type anything in this command line and click enter.
It will be tweeted as a new tweet.
That's it. Hola you finally did it
If you still have any queries, check out the video
If you like my content, please consider supporting me
Hope it's useful
A ❤️ would be Awesome 😊
Discussion
i did all the steps (pretty sure correctly) and when i open the file it auto closes, what am i doing wrong?
In such case, Open cmd and enter "python -i filename"
Now it will work
can you show me a pic/video on how to do this exactly? im a bit confused [btw i named the file anything.py (its not anything.py.py its shows as anything.py)]
sure, please check the image below

If you want to upload image or video in a tweet, use this
where do i put the image path
In 5th line, inside input enter the image location
figured it out that im supposed to put to // on the path or else it will have an error
great tutorial but I have a question, what if i have to reply ny specific tweet using the app, is there ay to do that?
Thanks, we can reply but we need to modify the code for that
sorry im kinda retard, can you give me an example? because it didn't work on me (i'm new to this)
Do you have the code for that? That would be very helpful
instead of using
api.update_status(status =(tweet))
use api.update_status("your reply", in_reply_to_status_id = tweetid)
ok but what if i want to reoky to a specific tweet?
Copy the link of the tweet
Ex: twitter.com/AndroidPolice/status/1... and last "1308397020034420736" is the tweet id
Thank You so much🙏
How do I reply to other tweets or replies?
I mentioned the process in comments section.
Kindly check it
import tweepy
auth = tweepy.OAuthHandler("Secret", "secret")
auth.set_access_token("secret", "Secret")
api = tweepy.API(auth)
reply = input(" ")
tweetId = input(" ")
api.update_status(reply, in_reply_to_status_id = tweetId, auto_populate_reply_metadata=True)
print ("Done!")
This is my solution
sorry i'm kinda retard,can you make an example?,(i don't know what's my mistake but it didn't work)
That was great Sunil. Thanks for letting us know.
Thanks ☺️
hey i succesfully completed all the steps and it worked fine for me untill i realised that my twitter label has a speel mistake how do i change my twitter label again ?
You can edit the app name or create a new app it will work
what is the code to add geolocation to a tweet?
is there a way i can tweet from an account different from the one i used to register as a developer?
No
where do i put where my label should be
hello, i already had a dev account so i used that to make my app and it works, but i was wondering how i could use this same app to tweet on a different account. thanks!
can i do this using an android phone?
no
hi is this possible on a Mac?? because I'm finding it really hard, I'd really appreciate the help.
hello, what if I want to create a twitter thread? it seems like using the customized source label is only exclusive to 1 tweet???
You can
I did all the steps and I did what it said in the comment below me and it still doesn't work. Need Help.
Hi, can you show me an example on how to reply a specific or how to set the code with an image, Im sorry Im a bit confused and tried many times
Some comments have been hidden by the post's author - find out more