TwitterOAuth is abstracted a little bit more.

You can do the following which will us JSON and automatically parse it into
an object.

$content = $connection->get("users/show", array('screen_name' => $NAME);

If you really want to handle the XML parsing yourself you can do the
following

$connection->format = 'xml';
$xml = $connection->get("users/show", array('screen_name' => $NAME);

Abraham
-------------
Abraham Williams | Hacker Advocate | abrah.am
@abraham <https://twitter.com/abraham> | github.com/abraham | blog.abrah.am
This email is: [ ] shareable [x] ask first [ ] private.



On Wed, Feb 2, 2011 at 10:03, Check <[email protected]> wrote:

> I am having problems getting a simple GET users/show.xml request to
> work.   If I log in to http://dev.twitter.com/ and even try to use it
> on the Twurl console, I get a "user not found" error no matter who I
> request.
>
> If I make a request via my PHP in the format
> http://twitter.com/users/show/NAME.xml,
> it works fine, but am of course rate limited to 150 calls per hour.
> Our app needs to make several hundred.
>
> If I use twitteroauth.php and the format:
>
> $content = $connection->get("users/show.xml?screen_name=NAME");
>
> I get nothing back, user not found, just like the Twurl console.  I
> can get other requests to work with the Twurl app and/or oauth (such
> as statuses/public_timeline), but it appears users/show just will not
> return a user.  I have also tried it with user_id=XXX *and*
> screen_name=NAME, still doesn't work.
>
> What am I doing wrong?  TIA
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to