Just to hop in on this one.

When you make a request to the Twitter API it is important you check the
HTTP code returned in the headers. When Twitter throws any 50x error (over
capacity for example) we return an HTML page. We're working on fixing this
but for the time being, if you receive a 50x response from the Twitter API
you should not try and parse the response with an XML or JSON parser.

I hope that explains what is happening in your code.

Matt

On Thu, Aug 5, 2010 at 7:31 AM, Brian Fromme <b.from...@gmail.com> wrote:

> Omg. Its all so clear now! J'son. No, being an ass.
>
> -----Original Message-----
> From: Tom <allerleiga...@gmail.com>
> Sent: Friday, August 06, 2010 10:23 AM
> To: Twitter Development Talk <twitter-development-talk@googlegroups.com>
> Subject: [twitter-dev] Re: Will you guys help me here?
>
> On Aug 6, 11:06 am, Rushikesh Bhanage <rishibhan...@gmail.com> wrote:
> > Hi guys,
> >
> >    with a hope to get some sort of help here,  I wanted to ask you guys,
>  I
> > am getting error while loading xml formatted data into       object
> >     like:
> >
> > *   "Warning*: simplexml_load_string()
> > [function.simplexml-load-string<
> http://www.honestfollowers.com/function.simplexml-load-string>]:
> > Entity: line 50: parser error : Entity 'rsaquo' not defined in        *
> > /home/ajit/public_html/
> honestfollowers.com/TwitterAPILibrary/mytwitter1.php*on
> > line
> > *486"
> Simplexml can't handle all (any?) entities. You can try using the full
> PHP XML parser (http://php.net/xml) or write your own.
>
> > *   Line 486 on mytwitter1.php is :       $data =
> > simplexml_load_string($xml);
> > *
> >    *Due to this error I am not getting whole data of a user.
> >
> > *   *Is it twitter overcapacity error? because this error comes usually
> when
> > even my twitter homepage comes in a damaged         state.
> It is possible - make sure to write a few lines of code to make sure
> you have some error handling.
>
> >    if this is not from twitter-side , what can be the problem(means like
> > internet speed or anything)?
> PHP can be the problem.
>
> > *
> >    *I am using rest API method and My Twitter Class PHP by Andres "Artux"
> > Scheffer, Mozilla browser (v3.6.8).
> >
> >    I will really appreciate your help guys.
> >
> >    Thank you in advance.
> You're welcome.
>
> One more note before ending this message: You should consider using
> JSON instead of XML. It's easier to parse and requires less bandwidth.
>
> Tom
>
>


-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris

Reply via email to