-
Notifications
You must be signed in to change notification settings - Fork 127
How to use API Proxy
API proxy was, is and will be commonly and widely used by most users from China behind the firewall.
What is API proxy?
Contributors outside mainland China always be perplexed by the ambiguity of API proxy. We do know API is the abbreviation of Application Program Interface and Proxy is a redirect method. So the combination of them means here we create a program functions rebinding an API call to twitter.com, that is blocked by Bin Xing Fung and his great firewall, to our web based application and calling to twitter.com from it. this two way program works like a proxy, but it does not re-transfer the normal http request but twitter API calls.
During the re-transfer, calls can be modified by our application or not. if they are, Override mode outcomes; if not, here comes Transparent Mode.
Hotot has been tested with these two API proxies.
Twip is a PHP-based API proxy. The latest version(Twip4) works in two different modes, T(transparent) mode and O(override) mode.
Hotot supports both of them recently.
- Setup your Twip (visit the wiki of Twip for more info);
- Launch Hotot for the 1st time, create a Twitter profile, but do not get oauth token;
- Go "Preferences"->"Networks"->API Settings;
- Fill text entry "API Base" with your API_BASE_URL/t/(take care of the ending backlash.)
- Make sure you have unchecked "Same signing API base"
- Make sure the URL in text entry "Signing API Base" is "https://api.twitter.com/"
- Fill text entry "OAuth Base" with your API_BASE_URL/t/oauth/
- Make sure you have unchecked "Same signing OAuth base"
- Make sure the URL in text entry "Signing OAuth Base" is "https://api.twitter.com/oauth/"
- Press OK to save your changes.
- Sign out, use OAuth to sign in.
- Copy the url in the textbox, open it in your browser, input your twitter username and password, authorize our application, click "okay", returns a string, now input it in Hotot.
- Now success! Congrats and enjoy yourself.
- Setup your Twip (visit the Wiki of Twip for more info);
- Launch Hotot, Create a identi.ca profile and go "Preferences"->"Networks"->API Settings;
- Fill text entry "API Base" with your API_BASE_URL/o/Twitter_Username/Random_String_Generated_By_TWIP4/
- Make sure you have checked "Same signing API base"
- Press OK to save your changes.
- Sign out, use basic auth to sign in.
Notice that the username or password is ignored when using o mode,so you can input anything.
Notice that if you are using twip (3.x), the password is the TWIP password, not your twitter password.
Tutorial below is NOT reviewed and tested with the last version, so its availability is unknown.
Gtap is a simple solution running on Google App Engine which can proxy the HTTP request to twitter's official REST API URL.
- Setup your Gtap (visit the wiki of Gtap for more info);
- Launch Hotot, Create a identi.ca profile go "Preferences"->"Networks"->API Settings;
- Fill text entry "API Base" with your API_BASE_URL
- Make sure you have checked "Same signing API base"
- Press OK to save your changes.
- Sign out, use basic auth to sign in.
Notice that the password is the GTAP password, not your twitter password.
GOOD LUCK!
Marguerite.