Colin, echo $buffer to see what you are getting from twitter. Could be
a whale.

Ryan

On Jul 7, 10:42 am, "colin....@digital.fco.gov.uk"
<colin....@digital.fco.gov.uk> wrote:
> $twitter_url = "http://api.twitter.com/1/statuses/user_timeline/
> britishabroad.xml";
>
> $buffer = file_get_contents($twitter_url);
> $xml = new SimpleXMLElement($buffer);
>
> $status_item = $xml -> status;
> $status =  $status_item -> text;
>
> echo $status;
>
> I am getting an error:
>
> Fatal error: Uncaught exception 'Exception' with message 'String could
> not be parsed as XML' in /home/bhammers/demophon/dashboard/test.php:5
> Stack trace: #0 /home/bhammers/demophon/dashboard/test.php(5):
> SimpleXMLElement->__construct('') #1 {main} thrown in /home/bhammers/
> demophon/dashboard/test.php on line 5
>
> Would appreciate any help.
>
> Thanks
>
> Colin

Reply via email to