I’m using a very simple PHP include to grab my current twitter status and output the content into my website. The trouble though, is that the output doesn’t generate links like the actual status does when there are URLs in the status.
What is the best or simplest way to make this happen?
Here’s the PHP I’m using to populate the status:
<?php
$response = new SimpleXMLElement('http://twitter.com/users/show/jglovier.xml',NULL,TRUE);
echo $response->status->text.'';
?>
*EDIT: since I’m only a front-end developer most comfortable with HTML, CSS, and barely JS, I’m looking for the simplest fix here, preferably JS based.
Try using bcherry/twitter-text-js. It will autolink URLs, @mentions, and #hashtags to the specification that twitter.com uses.
Put twitter-text.js on your server, load it after you load jQuery, and run the snippet below on document ready.