Solved

Twitter gadgets

Posted on 2012-03-12
1
303 Views
Last Modified: 2012-03-19
Hello Experts,

I have seen some gadgets online but they seem to be so slow.
How can i create something as simple as this gadget on this website?

I want to have like the last 3-4 statuses updated on a side bar.

http://annenberg.usc.edu/
0
Comment
Question by:shpresa
1 Comment
 
LVL 14

Accepted Solution

by:
EMB01 earned 500 total points
ID: 37711454
You must get a twitter api key here https://dev.twitter.com/ then you can loop through a user's tweets like this (let me know if you need help or you had something else in mind):
$home_timeline = $twitteroauth->get('statuses/home_timeline', array('count' => 5));  
//print_r($home_timeline);
$html .= '<div class="tweets">';
foreach ($home_timeline as $tweet)
{
$html .= '<div class="tw"><a href="https://twitter.com/#!/'.$_SESSION['username'].'">@'.$_SESSION['username'].'</a>'.$tweet->text.'</div>';
}
$html .= "</div>";
echo $html;
}

Open in new window

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now