News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
How to Create Your Own Twitter Widget in PHP, Part 1
January 05, 2011 @ 13:13:00

From the SitePoint PHP blog today there's a new tutorial from Craig Buckler (part one of a series) on how to create your own Twitter widget you can drop in anywhere on your site (main content or sidebar). It uses cURL to make the requests to the Twitter servers, so you'll need that installed on your PHP instance.

Because you can! Your own widget will always be more customizable than any off-the-shelf solution, and you'll be the envy of your peers. We've also been asked by several readers for articles about the topic, and it's a great introduction to PHP, REST APIs, JSON, regular expressions and Object Orientated Programming.

In this first part of the series, he helps you set up the class to connect to the Twitter services and fetch the latest statuses for the SitePoint account (obviously, you can substitute yours in its place) and some of the basics like templating and caching. The script uses the REST API since it only needs to fetch, so there's no messing around with the OpenID authentication the Twitter API now requires. You can also download the source for the code that'll be generated during the series.

0 comments voice your opinion now!
twitter widget rest api tutorial series


blog comments powered by Disqus

Similar Posts

Sameer Borate: Efficiently Replicating RETS data to MySQL

KillerPHP.com: Zend Framework Components Part 2: Zend_View

phpRiot.com: Shortening URLs for goo.gl with Google's URL Shortener API

PHPWomen.org: Filter and PHP 5.2

Juan Terminio's Blog: Setting Up a Debian VM, Step by Step


Community Events

Don't see your event here?
Let us know!


opinion extension voicesoftheelephpant library introduction development community podcast laravel middleware unittest release interview framework series laravel5 conference api language wordpress

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework