在國內繼續出 tweet (1) – twip API proxy

最近發現國內使用的新手機華為「閃耀」不能連接 VPN,上週替同事購入的聯通 3G 數據咭,原來亦不能接通 VPN (舊一批的 SIM 咭還可以的),可見國內的防禦能力好强大,主要係迫使國民全情投入 Weibo 微博,對於我這位 twitter 用家卻苦不堪言。

twip API Proxy

於是在人生中,第三次再嘗試安裝 twip,這次才成功原來是由於最初 2 次都忘記設定好 file/folder permission=777。

twip 是一個 twitter API proxy 可以在以下軟件中,取締原生 twitter API,目的是身於强國中亦能使用到 twitter,我是 Plume 用家,此正合我意。

  • iPhone iOS:Twitter, TwitBird
  • Android:Twigee, Plume, Seesmic

自設 twip rpoxy

用家只要到 twip 下載 yegle-twip.zip 套件,然後到 Twitter Applications 網頁中申請個人 OAuth Consumer Key/Secret,把 Twitter 提供之 secret key 輸入於 twip 設定檔中,然後把所有的 twip 檔案上載到用家的 php server,便大功到成。

大前題是用家要有個人的 php server,未有的話,可以到網絡申請些免費服務,或者到我剛剛介紹過的 Scicube 申請其 domain & web hosting 服務。

 

Twip User Guide

以下把 twip 安裝的步驟簡略紀錄,不清楚的話可以參考 Twip User Guide

  • 到 twip 下載 yegle-twip.zip
  • 解壓 yegle-twip.zip
  • 到 Twitter Applications 申請 New Applications
  • 輸入 Application Details
  • 輸入 Access = Read, Write and Access direct messages
  • 輸入 Callback URL = 上載後的網頁位址
  • 從 Twitter 得到 Consumer key 和 Consumer secret 後
  • 在 PC 上打開 yegle-twip 解壓後的 “config-example.php” 檔,填入 OAUTH_KEY, OAUTH_SECRET, BASE_URL 三項資料,然後改名為 config.php
  • 注意 BASE_URL = http://example.com/twip4/ (包括最後的斜劃)
  • 上載 twip 檔案到用家的 php server
  • 記得把檔案夾的 premission 設定為 read/write 權限 (644)
  • 進入剛架好的 twip 網址 http://www.example.com/twip4/ 進行設定
  • 一般使用 O-mode 登記便可以,經 twitter 受權後便會得到一個 twip API proxy 地址,例如:  http://www.example.com/twip4/o/apiproxy/
  • 在 Android Plume 上進入 Settings > General > Alternative Server 中輸入 API proxy,例如 example.com/twip4/o/apiproxy,! 注意不要輸入最後的斜劃,也刪去 http:// 或 https:// ,我 clear cache 重新開啟 Plume 便完成

剛剛試了一整天,感覺上使用了自家 API proxy 之後,load tweets 的速度還提升了,至少在國內還可以緊貼一班 tweet 友是令人開心的。

 

 

 

 

You may also like...

4 Responses

  1. cHuEn says:

    前輩,我都係用 scicude hosting 但一按 o mode 就話 internal server error。 已將 twip folder 777。請指教。

  2. blambin says:


    cHuEn:

    前輩,我都係用 scicude hosting 但一按 o mode 就話 internal server error。 已將 twip folder 777。請指教。

    me too!

  3. terewong says:

    @CHuEn 你解決了啊
    @blambin 除了 twip folder 之外,當中的 sub-folder 及裡頭的 php 也要調整 premission,改成接受 read/write

  4. terewong says:

    最近我更新 twip 之後出現問題,出現這句警句:

    “Parse error: syntax error, unexpected T_FUNCTION in /……/twip/filters/1_1__statuses__NUMBER__activity__summary_json.php on line 5”

    作者說網上最新版本是給 PHP 5.3.0 配合使用,否則要用舊本的 6765761 ( https://github.com/twip/twip/commit/6765761c761c4f0aa3767c358e689f428aca6192 ),Scicube 暫時還未更新至 5.3.0,所以我把 twip.php 更新至舊版本的內容。

    於是可以繼續在 Twidere 上使用 TWIP 追 tweet

Leave a Reply

Your email address will not be published. Required fields are marked *