Fetching Tweets


Public Timeline

1
2
3
4
5
$t = new twitter;
$t->username = 'user';
$t->password = 'password';

$data = $t->publicTimeline();

You can also pass the since parameter, which is the HTTP-formatted that you want to gather data after:

1
2
3
4
5
$t = new twitter;
$t->username = 'user';
$t->password = 'password';

$data = $t->publicTimeline('Sun, 06 Nov 1994 08:49:37 GMT');


Replies

1
2
3
4
5
$t = new twitter;
$t->username = 'user';
$t->password = 'password';

$data = $t->getReplies();

get_replies() supports 3 parameters: page, since and since_id.

  • page – In Twitter speak, a “page” constitutes a set of 20 posts. page=3 would mean tweets 40-59
  • since – an HTTP-formatted timestamp (Sun, 06 Nov 1994 08:49:37 GMT)
  • since_id – an integer representing the ID of a tweet