I am a geography teacher and would love to map tweets in QGIS for my pupils. I followed all the instructions but it seems Twitter have changed the way they stream their tweets. I can cope with the GIS side but I am not a Twitter developer. Is there any advice you can give a very busy teacher on getting those tweets?


I used to do this with curl as described here, but Twitter removed basic authentication support from public streaming endpoints on June 11, 2013, so you need to use OAuth. In order to do this you need to have a Twitter account and request an application.

Below is a very simple example, written in Python using the twython library.

from twython import TwythonStreamer

# supply your OAuth values below
APP_KEY = 'xxxx' 

class MyStreamer(TwythonStreamer):
    def on_success(self, data):
        if 'coordinates' in data:
                 print 'lat: ', data['coordinates']['coordinates'][0], 'lon: ', data['coordinates']['coordinates'][1],  '\n'

    def on_error(self, status_code, data):
        print status_code, data

stream = MyStreamer(APP_KEY,


If Python is not your language of choice, there are other options.


If you don't want to use any programming language whatsoever, you could try something like Geofeedia (see below), which would allow you to look at Twitter and other social media feeds in a geographic context. The website has a closed Beta right now, but you can apply for access.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.