Quantcast
Viewing all articles
Browse latest Browse all 13

By: Jeff Sayre

Kory-

All you need to do is the following:

1.) Request the two most recent tweets by setting rpp = 2, instead of one, in the query string.

2.) Then, in the parse_feed function, add an additional variable to extract the second tweet array element:

$tweet_array3 = explode( “”, $tweet_array[2] );

3.) You’ll next need to add another $tweet variable and process it in the same way as the first one–making sure that where ever there is a $tweet variable referenced, you create a new reference for $tweet2. This could be done via a loop if you wished.

$tweet2 = $tweet_array3[0];
… etcetera

4.) Finally, you’ll need to make sure that the new $tweet2 variable is returned and also is referenced in the list() function.

return array ( $tweet, $tweet2, $tweet_extra );

list ( $tweet, $tweet2, $tweet_extra ) = parse_feed( file_get_contents( $latest_tweet ) );

Style to your liking!


Viewing all articles
Browse latest Browse all 13

Trending Articles