Solved

Twitter gadgets

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

Suggested Solutions

Title # Comments Views Activity
Delete HTML table rows 12 28
Browser Chrome downloads colored link 5 41
Add box and text color changing for everything 1 25
tiny glitch in my main slider 3 23
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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