Solved

Twitter gadgets

Posted on 2012-03-12
1
309 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

910 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

22 Experts available now in Live!

Get 1:1 Help Now