ウェブページに最新のツイートを表示しようとしていますが、Twitter API に非常に慣れていないため、その方法がわかりませんが、これまでのところ.
function my_streaming_callback($data, $length, $metrics) {
echo $data;
}
require '../tmhOAuth.php';
$tmhOAuth = new tmhOAuth(array(
'consumer_key' => 'key',
'consumer_secret' => 'secret',
'user_token' => 'token',
'user_secret' => 'secret',
));
$method = 'http://stream.twitter.com/1/statuses//show/:id.json';
//not sure where I am supposed to get the :id from?
$params = array(
//not sure what to put here, I would like to display the last 5 tweets
);
$tmhOAuth->streaming_request('POST', $method, $params, 'my_streaming_callback');
$tmhOAuth->pr($tmhOAuth);
私はこのhttps://github.com/themattharris/tmhOAuthを使用して認証し、Twitter API とやり取りしていますが、これらすべてが私にとって非常に新しいため、非常に混乱しています。
だから基本的には最新のつぶやきを試してみたいと思います。できるだけ早くこれを完了する必要があるので、どんな助けも大歓迎です。事前に感謝します! :)