Search code examples
posttwitterproxyhttp-request

How are Tweets sent?


I am very confused about something here. How is a tweet sent to the server once you hit the "Tweet" button from the website?

To answer this, I set up a proxy listener to intercept all requests and everything. I set my browser on localhost and everything, and, while I received all request while loading Twitter.com, there was no requests received from the time I hit "Tweet" and the time it showed up in my stream.

How is this even physically possible? Is there something extremely simple I'm missing here?


Solution

  • Twitter uses HTTPS exclusively now, so without setting up a MITM proxy, you will be unable to snoop on the data that is being transmitted.

    With regards to setting up a MITM proxy, check out this piece of software: mitmproxy

    If you're looking to send Tweets yourself, separately from Twitters web page / apps, check out their API: Twitter 1.1 API - statuses/update

    Most browsers come with developer plugins, which will let you see what data is being sent by requests (including HTTPS requests). The best - in my opinion - is Chromes developer extension (which is installed by default), which can be opened by pressing 'F12'. Another alternative is Firebug for FireFox, which once installed can also be opened by pressing 'F12'.

    Further more, perhaps you should add a bit more context to your post, such as what platform you're interested in, such as Android, iPhone, or Web (i.e. Twitters vanilla website).