So I made this post due the twitters infamous changes that screwed up my last script that pulled your last tweet via atom protocol…
Anyways I can’t take full credit for the script since part of it I got from Bradley Spencer, I simply added the formatting functionality after the tweet extraction which he did not provide on his blog ;)
[cc lang=”php”]
// set user name
$username=’websymantecs’;
// set format
$format=’json’;
//get tweets and decode them into a variable
$tweet=json_decode(file_get_contents(“http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}”));
//now lets take this variable/string and manipulate it to display it formatted correctly…
$link = strstr($tweet[0]->text, “http”);
$text = substr($tweet[0]->text, 0, strpos($tweet[0]->text, “http”));
echo $text . ‘‘.$link.’‘;
[/cc]
Published by

Miguel
I am a bilingual Network Engineer with over 20 years of professional experience in computer science and information technology. I am the founder and operator of Web Semantics, based in Vancouver, Washington, where I design, secure, and manage enterprise-grade infrastructure for small and mid-sized businesses across the West Coast. I provide bilingual IT support in English and Spanish, specializing in network architecture, systems engineering, security, and operational resilience.
Soy un ingeniero de redes bilingüe con más de 20 años de experiencia profesional en ciencias de la computación y tecnología de la información. Soy fundador y operador de Web Semantics, con sede en Vancouver, Washington, donde diseño, protejo y administro infraestructura empresarial para pequeñas y medianas empresas en la costa oeste. Ofrezco soporte de IT bilingüe en inglés y español, con especialización en arquitectura de redes, ingeniería de sistemas, seguridad y resiliencia operativa.View all posts by Miguel