Tag Archives: Postaday2011

曾志豪 – 什麼是教壞細路?

那天,黃毓民用孟子《離婁上》「是以惟仁者,宜在高位,不仁而在高位,是播其惡於眾也」來質問曾蔭權何以指派民望極低的林瑞麟出任政務司,可能「離婁」和「彌留」同音,觸碰到正處於「彌留狀態」的曾蔭權的敏感神經,故此以「黑社會爛仔」反唇相譏。事後不少市民為曾特首言論而喝采歡呼,紛指「罵得好」,問其原因,答曰:呢啲議員成日大大聲教壞細路,特首鬧得佢啱。

何謂教壞細路?我最近很愛用這個比喻解釋。 Continue reading 曾志豪 – 什麼是教壞細路?

陶傑 – 客觀說功過

滿城聲討曾蔭權。順應潮流打落水狗,很容易的事。

但在史學家的角度,種裔是炎黃子孫的曾蔭權管治一個中國人社會,真的那麼壞?

我不會把曾先生譬喻為三十年代滿洲國皇帝溥儀,不,那樣太涼薄了。但當曾特首連委任一個他心儀的好兄弟曾俊華做政務司司長的權力也沒有,香港人是不是該體諒他一點?

我相信曾蔭權真心希望實現真正的普選,這樣會令他歷史留名,可是他也沒這個權。打擊壟斷的暴利?更不可能。香港的金權人士,都直通天庭,不要忘記,殖民地時代,英國的文化與你的什麼「三千年燦爛文明」不同,彭定康可以嘲笑企圖繞過他、到唐寧街打小報告的商人:「首相和我之間,親密無縫,攝不進一張紙」,但中國的宮廷政治生態,太監、宮婢、龜奴,像蜥蜴一樣滿地爬,是另一回事。 Continue reading 陶傑 – 客觀說功過

twitteroauth – Force User Login

twitteroauth is the first PHP Library to support OAuth for Twitter’s REST API. It is developed by Abraham Williams. You can download the source code @ GitHub and the example inside is quite easy to follow.
GitHub – abraham / twitteroauth
 

Unlike the Facebook API, the Twitter API does not support logout. If you want to increase the security, you can force user login every time when he/she clicks the Signin with Twitter button. This can be down by adding the force_login parameter in the GET oauth/authenticate request.
Twitter API – GET oauth/authenticate Continue reading twitteroauth – Force User Login

Facebook Javascript SDK – Reload/Redirect URL after Facebook Login

 
Update 2012-01-14: For OAuth 2.0 implementation, please refer to the new post.
Facebook Javascript SDK – Logout with OAuth 2.0

Update 2011-12-19: Since Facebook has updated their authentication system and HTTP to OAuth 2.0 and HTTPS. The following example will not work any more. i will update the post later. For more information, you can refer to Jerry Cain – Updated JavaScript SDK and OAuth 2.0 Roadmap

 

We tried a simple Facebook login using Facebook Javascript SDK yesterday.
Facebook Javascript SDK – A Simple Login Page

In the above post, the browser will not refresh the website URL after the Facebook login process is completed. We have to issue a refresh manually. Actually we can add the reload/redirect with just a simple API call.
Let’s add the FB.Event.subscribe in fb-login.php. Continue reading Facebook Javascript SDK – Reload/Redirect URL after Facebook Login

jQuery & JSON – Make Cross Domain Request Using jQuery.getJSON() with JSONP

A few days ago i posted an article about making a JSON request using $.getJSON().
jQuery & JSON – Make JSON GET request using jQuery.getJSON()

But i have made a mistake there because i didn’t realize the Cross Domain problem. So this article shows you how to resolve the Cross Domain issue in $.getJSON() by JSONP. Continue reading jQuery & JSON – Make Cross Domain Request Using jQuery.getJSON() with JSONP