Esto utiliza la API REST, no el API de Streaming, pero creo que va a hacer lo que busca. La única limitación es que está limitada por la API REST a los últimos 200 tweets, por lo que si tienes más de 200 tweets en la última semana, solo hará un seguimiento de las palabras de tus 200 tweets más recientes.
Asegúrese de reemplazar el nombre de usuario en la llamada API con su nombre de usuario deseado.
<?php
//Get latest tweets from twitter in XML format. 200 is the maximum amount of tweets allowed by this function.
$tweets = simplexml_load_file('https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&include_rts=true&screen_name=kimkardashian&count=2');
//Initiate our $words array
$words = array();
//For each tweet, check if it was created within the last week, if so separate the text into an array of words and merge that array with the $words array
foreach ($tweets as $tweet) {
if(strtotime($tweet->created_at) > strtotime('-1 week')) {
$words = array_merge($words, explode(' ', $tweet->text));
}
}
//Count values for each word
$word_counts = array_count_values($words);
//Sort array by values descending
arsort($word_counts);
foreach ($word_counts as $word => $count) {
//Do whatever you'd like with the words and counts here
}
?>
ayuda por favor, por favor !! una pista, un consejo, lo que sea – bentham
Según las respuestas a esta pregunta, no parece que el twitter tenga un historial http://stackoverflow.com/questions/1662151/getting-historical-data-from-twitter –
Sé que así que quiero saber por una semana – bentham