PHPのPEARでOAuthを使ってGoogle Latitude APIを叩くことに成功したのですが、初めてのOAuthアプリということで結構苦戦したのでメモ。 さてOAuthのデモというとTwitterのAPIを叩いたサンプルコードが多いんですが、TwitterのAPIにはScopeなど引数をつけることがないので、そのままコピペでは他のAPIが叩けないサンプルが多いです。 そこで今回、Google Latitude APIを叩いてみましたのでご紹介します。たぶん日本語の「Google Latitude APIを叩いてみた」がないのでGoogleLatitudeにしましたが、基本的にGoogleのOAuthを使うアプリであればこのコードを流用すれば動く気がします。 ※今回のコードで動いているサンプルあこちら PHP(PEAR)でOAuth経由でGoogle Latitude APIを使っ