Before, we have introduced an interesting version of Echofon for Firefox, with which you can use your own Twitter API proxy; now, we will introduce how to create a Twitter API proxy with GTAP.
As a GAE application, GTAP is available for you to create a free Twitter API proxy with OAuth support, so that you can customize the URL shorten service, the tweet source, the hashtag and some other features of Echofon.
I. How to create A Twitter API proxy with GTAP
Since GTAP is based on GAppProxy, the installation of GTAP is familiar with that of GAppProxy, and below are the detailed steps:
Step 1. To create a Twitter application
You can register a new application on the Twitter Application Platform, just pay attentions to below four items:
- Application Name: This is for where your tweets are from,
- Application Website: This is for where the application name links,
- Application Type: Must select “Browser”,
- Default Access type: Must select “Read & Write”.
After registration, you will get a Consumer key and a Consumer secret on a new window, such as below:
Both the Consumer key and the Consumer secret will be used later.
Step 2. To create a GAE application
Same as GAppProxy, you can sign in your GAE account and create an available application ID, such as “freenuts-gtap” used for this post.
Step 3. To download and install Python and Google App Engine SDK for Python
Same as GAppProxy, to run the GTAP application, you need to download and install Python and Google App Engine SDK for Python.
Step 4. To download and extract GTAP
You can just visit the GTAP Downloads page and download the latest version, then extract the ZIP file.
Step 5. To edit the app.yaml file
Open the app.yaml file in the GTAP folder, and replace “your_application_id” with your new GAE application ID, such as “freenuts-gtap” for this post.
Step 6. To edit the main.py file
Open the main.py file in the GTAP folder, and replace the CONSUMER_KEY and CONSUMER_SECRET with your Twitter application’s mentioned above.
Step 7. To upload GTAP
Run the CMD program, and use below commands to upload the GTAP folder to your GAE account:
appcfg.py update gtap_folder_name
For example, if the location of the GTAP folder is as below:
The commands to upload it to GAE will be like those in below image:
When the process is finished, you will see something like below image:
Now, you have created a Twitter API proxy, which address URL is like below:
And to use this Twitter API proxy, you can follow below steps.
II. How to use a Twitter API proxy
To use a Twitter API proxy, you will also need an API key as your Twitter account password.
Step 1. To get your API key
Visiting your Twitter API proxy address, you will see a webpage like below:
Click the “Sign in with Twitter” button, allow your GTAP application to reach your Twitter account, then you will get your API key as below image:
As mentioned before, the API key will be used as your Twitter account password for Echofon, and you can change the API key to any characters.
Step 2. To use your Twitter API proxy
You can use your Twitter API proxy address and the API key to update your tweets from Echofon for Firefox now.
By the way, besides Echofon for Firefox, the Twitter API proxy you create will be workable for any other browser-based Twitter application that allows you to use your own Twitter API.