This post is inspired from Engadget article. I have added more detailed instructions to the same.
Follow the steps below:
*
Install python
sudo apt-get install python python-pip
*
Install Twitter's python wrapper
pip install twitter
*
Install Speedtest-cli
pip install speedtest-cli
*
Login to https://apps.twitter.com and create a new application.