twitter APIのメモ(PHP)
OAuthを使う
TLを取得する
$tlの中にXMLの内容が格納される
mentionsを取得する
OAuthを使う
- twitteroauth.phpを使うのが便利
- config.phpに、CONSUMER_KEY,CONSUMER_SECRET,CALLBACKURLを記載
- index.phpを編集し、OAUTH_TOKEN,OAUTH_TOKEN_SECRETを確認する
- OAuthを許可する
TLを取得する
.
$tl = $connection->OAuthRequest("http://api.twitter.com/1/statuses/user_timeline.xml","GET",array());
$tlの中にXMLの内容が格納される
mentionsを取得する
$mentions = $connection->OAuthRequest("http://api.twitter.com/1/statuses/mentions.xml","GET",array());
UTF-8で返ってくるので、必要に応じてmb_convert_encoding等で文字コードを変換する
こういう本がほしい。立ち読みしてみるかな
Twitter!―Twitter APIガイドブックposted with amazlet at 10.05.13辻村 浩
九天社
売り上げランキング: 362557
おすすめ度の平均: 
触ってみよう、という気にさせます
Twitter API プログラミングposted with amazlet at 10.05.13辻村 浩
ワークスコーポレーション
売り上げランキング: 1160







