Login   Register  
PHP Classes
elePHPant
Icontem

Syron Twitter: Display the latest statuses of a Twitter user

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Robert Mayer
Name: Robert Mayer <e-mail contact>
Packages: 1 Browse all classes by Robert Mayer Browse all classes by
Country: Sweden Sweden - PHP jobs in Sweden
Age: 25
All time rank: 325524 in Sweden Sweden
Week rank: 933 Up5 in Sweden Sweden Up


  Detailed description   Download Download .zip .tar.gz  
This class can be used to display the latest statuses of a Twitter user.

It can retrieve the RSS feed with the timeline of the latest statuses of a given user.

The class parses the RSS feed and display the status messages and their published dates.



Example:
<?php

$twitter = new syronTwitter("syron1988", 4, true);

$twitter->userColor = "#FF0000";
$twitter->chanColor = "#FFFF00";

$twitter->readPosts();

$twitter->getTwitterLink("syron1988");

?>

Explanation:
First of all we got to start the new class by creating a new variable and set the class to it:
$twitter = new syronTwitter("syron1988", 4, true);

the first parameter in syronTwitter class is the username I want to read the rss file of. the second and third are optional:
1-20 = number of posts you want to read
true / false = if you want to cut the username out of the rss file - twitter gives us the username by each post, but that can be disabled by setting "true" into the class.

$twitter->userColor, changes the color of usernames in post. if u posted something to a user like @username, then it will be displayed with a changed color. The same thing happens with #channel, when using
$twitter->chanColor. Look example!

Next row:
$twitter->readPosts();
reads the posts.

Next row:
$twitter->getTwitterLink("syron1988");
Gives us the the link to the username you have as a parameter, if empty it will show the usernames profile which the .rss file gave us.




One more additional function is:
$twitter->readLastPost();
which reads the last post - as the function already says!

  Classes of Robert Mayer  >  Syron Twitter  >  Download Download .zip .tar.gz  >  Support forum Support forum (3)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Syron Twitter
Base name: syron-twitter
Description: Display the latest statuses of a Twitter user
Version: 1.1
PHP version: 5.0
License: Freely Distributable
All time users: 331 users
All time rank: 6222
Week users: 2 users
Week rank: 1120 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Social Networking Tools and components to integrate with social networking sites View top rated classes


  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file twitter.class.php Class to read twitter content

Download Download all files: syron-twitter.tar.gz syron-twitter.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.