Python Forum

Full Version: Callback URL for twitter app
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to create my first twitter app and ran to a wall that is called a callback url/
on twitter website this is an explanation:
https://developer.twitter.com/en/docs/ba...lback-urls

But that doesn't tell me much. Do you have any idea how this url should look like? I don't see it on my developer.twitter.com dashboard.

Should I have my own personal web site?

this is how basic code should look but I need to creat app first
from twitter import Twitter, OAuth

t = Twitter(auth=OAuth(<Access Token>,<Access Token Secret>, <Consumer Key>,<Consumer Secret>))
pythonTweets = t.search.tweets(q = "#python")
print(pythonTweets)
found this video (uses django, but should be similar if you are using Flask).
https://www.youtube.com/watch?v=uJ6p1ibNOdk

and for Flask: https://flask-dance.readthedocs.io/en/la...itter.html
Thank you, I had no idea that I need flask or django for this sort of stuff. Since I never touched it I think I will just skip this chapter. Well, maybe one day twitter account will be of use to me. :)
I have been programming (was my profession) for a long time. Seems I have to learn a new package or at least concept just about every day! But, I can also say that is what has made it so interesting!
Still, framework is not a joke. I would have to focus on one for at least couple of months...that would bring me to web developing field. I have limited time for learning python and have to focus on one thing.
Generally, these are if you're pretending to be someone else. Like, you open a link to Twitter (with a callback url), and then whoever's using your app will log into Twitter using whatever their credentials are. Once they're done, they'll be redirected to your callback url with some sort of short-term access token which you then use with the api, to make calls for that particular user.

The whole point of this, is allowing random third party apps (like what you're making) access user data, without ever having access to that user's login/password.