Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Twitter gadgets

Posted on 2012-03-12
1
Medium Priority
?
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
EMB01 earned 2000 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 Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

618 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