[twitter-dev] unauthenticated way to fetch profiles by ID?

2009-02-28 Thread Alex

I'm really liking the new social graph API calls and looking at
options for implementing new features in our app based on them.

The problem is that they return profiles by ID number and not any
other useful info, such as their actual username.

The only way I can think of offhand to fetch the profile is via the
users/show call, i.e.
http://twitter.com/users/show.xml?user_id=12345

Is there an easier way to do this?  Ideally a way that does not
require user authentication?

Alternatively, would you consider adding an option for the social
graph calls to return actual usernames instead of the user_id?

Thanks!


[twitter-dev] Total # of items of a search result

2009-02-28 Thread Gilles Frydman
Is there any simple way to return, via an API call,  the total # of hits for
a hashtag search?

--
G. Frydman


[twitter-dev] Re: Freelance Twitter API Dev directory?

2009-02-28 Thread Lucas Araujo

One more:

Twitter Username: @lucasaraujo
URL: http://code.google.com/p/friendfeed-as3/
URL: http://code.google.com/p/hellotxt-as3/
URL: http://code.google.com/p/migreme-as3/
Email: araujo.lu...@gmail.com
Technology: PHP, AS3

Lucas Araujo,
http://twitter.com/lucasaraujo


[twitter-dev] Re: Passing curl to XML

2009-02-28 Thread Mike

Hi,
  I am really new to all of this.  I got the greatbundi's code to work
and also another code.  What I am not understanding is why it does not
display other informormation.  For instance, for me at least, this
code does not tell me what friend's update I am reading.  It only
shows the text and for the life of me I can not figure out why!

  A brief explanation would be appreciated. Thank you.


On Jan 7, 8:29 pm, thegreatbund...@gmail.com
thegreatbund...@gmail.com wrote:
 Worked perfectly, thanks Chad!

 I'm sure I'll have another problem soon, but for now I'm rolling.
 Thanks again! :D

 On Jan 7, 8:05 pm, Chad Etzel jazzyc...@gmail.com wrote:

  I think the XML parser will choke on the headers that are being
  returned from your curl_exec.

  Try setting this instead:
  curl_setopt($ch, CURLOPT_HEADER, false);

  You'll also want to set this:
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  so that the XML is actually stored in $str when curl_exec returns;

  Try that out,
  -Chad

  On Wed, Jan 7, 2009 at 6:29 PM, thegreatbund...@gmail.com

  thegreatbund...@gmail.com wrote:

   Hello everyone,
   I'm working on my first Twitter-related project and am very excited to
   be doing so.

   What I'm trying to do is create a site that lists my
   friends_timeline. With that account, I'm following a group of
   individuals in a particular industry.

   Right now, I've been able to use curl to display the raw XML. Now I'm
   struggling to display that data the way I need to.

   Here's what I have written.

   blockquote
   ?php
   // set user/pswd
   $username = '123';
   $password = 'abc';

   // create a new curl resource
   $ch = curl_init();

   // set URL and options
   curl_setopt($ch, CURLOPT_URL, http://twitter.com/statuses/
   friends_timeline/ACCOUNT+NAME.xml);
   curl_setopt($ch, CURLOPT_HEADER, 1);
   curl_setopt($ch, CURLOPT_USERPWD, $username:$password);

   // execute and pass to browser
   $str = curl_exec($ch);

   // close curl resource
   curl_close($ch);

   $xml = simplexml_load_string ($str);
   foreach ($xml-status as $status) {
  print $status-text . \n;
   }

   ?/blockquote

   Again, this outputs the last 20 entries in friends_outline as XML
   just fine, but fails at the array. The following appears immediately
   afterward.

   blockquote
   Warning: simplexml_load_string() [function.simplexml-load-string]:
   Entity: line 1: parser error : Start tag expected, '' not found in /
   projects/tweets/test/curltest.php on line 20

   Warning: simplexml_load_string() [function.simplexml-load-string]: 1
   in /projects/tweets/test/curltest.php on line 20

   Warning: simplexml_load_string() [function.simplexml-load-string]: ^
   in /projects/tweets/test/curltest.php on line 20

   Warning: Invalid argument supplied for foreach() in /projects/tweets/
   test/curltest.php on line 21/blockquote

   I only have rudimentary PHP skills, but I'm a fairly quick study. Any
   advice is appreciated!

   Thanks in advance for the help!

   --Alex


[twitter-dev] php-twitter wrapper class

2009-02-28 Thread Aaron Brazell
Hey folks-

It's been a *very* long time since I updated the php twitter class (
http://code.google.com/p/php-twitter/). The latest beta of version 1.1 of
the class is available but it needs testing. It's been updated with almost
all of the stuff that Twitter has put out since August of last year but it
needs some thorough testing. If anyone wants to develop with it and pass
back:

1) Bugs
2) Patches
3) Both

The class does not include OAuth API as I am not on the testing list, but I
do want to make v1.1 stable before OAuth is in the wild.

Would very much appreciate your help if you are building PHP based Twitter
apps. :)

Thanks
-- 
Aaron Brazell
web:: www.technosailor.com
phone:: 410-608-6620
skype:: technosailor
twitter:: @technosailor


[twitter-dev] converting existing users to OAuth

2009-02-28 Thread Ivan

I apologize if this has already been addressed.

Is there an automated way to convert a set of twitter users in a 3rd
party application (i.e. usernames and passwords), into usable OAuth
credentials?

If not, this makes the transition difficult, both because additional
user action is required and app logic needs to include provisions for
different kinds of twitter accounts. That's translates to lots of
friction for the whole twitter developer userbase.

I'd be fine with a one-off mechanism that isn't open to an API but
involves submitting a CSV file or something like it to a form.

Thanks,
Ivan
http://tipjoy.com


[twitter-dev] sending credentials from one third party app to another

2009-02-28 Thread Ivan

Hi,

The current username/password basic auth system for the Twitter API
makes it easy to transfer credentials between third party
applications.

For example, any mobile or desktop client can use TwitPic's API using
the username/password they store.

This makes it so apps can leverage eachother, and is a very good
thing.

In my understanding, oauth access tokens don't commute, because the
oauth_consumer_key  oauth_consumer_secret are required and shouldn't
be shared.

How can 3rd party apps play nice with each other with OAuth based
authentication?

This is an issue for Tipjoy. You can see a growing set of tools for
twitter app developers to use us for payments here:
http://tipjoy.com/api

They won't work well without sharing authorization.

I don't have a good solution for this, and would love to hear what
ideas people have.

Best,
Ivan
http://tipjoy.com


[twitter-dev] Re: unauthenticated way to fetch profiles by ID?

2009-02-28 Thread Damon Clinkscales

On Sat, Feb 28, 2009 at 8:50 AM, Alex aybarb...@gmail.com wrote:

 The only way I can think of offhand to fetch the profile is via the
 users/show call, i.e.
 http://twitter.com/users/show.xml?user_id=12345

 Is there an easier way to do this?  Ideally a way that does not
 require user authentication?
That doesn't require user authentication, but it is rate limited by IP.

 Alternatively, would you consider adding an option for the social
 graph calls to return actual usernames instead of the user_id?
It's been requested but they can't do it without killing performance.
See http://code.google.com/p/twitter-api/issues/detail?id=265

 I forgot that we could just fetch their profile via HTTP GET such as:
 http://twitter.com/users/show/12667242.xml

 Do queries such as this count towards the max limit per IP per hour?
Yes.  In general, GET requests do count, but POSTs do not.

You can also apply for whitelisting here by describing to Twitter what
your app does:
http://twitter.com/help/request_whitelisting

-damon

-- 
http://twitter.com/damon


[twitter-dev] Re: converting existing users to OAuth

2009-02-28 Thread Abraham Williams

I would guess that there won't be a form to take CSV files but perhaps
there will be a temporary API method that jus returns access tokens.
The CSV file would have to include the users passwords to verify that
the submitter actually had permission to edit their profiles. Probably
not a good idea to have CSV files with loads of Twitter
username:passwords hanging around.

It is a little bit more work but you already have the basic auth code
and you will have to write the OAuth code. Might as well have them
running in parallel with an if check to see if they have set up OAuth
yet.

Abraham

On Sat, Feb 28, 2009 at 15:23, Ivan ivan.kiri...@gmail.com wrote:

 I apologize if this has already been addressed.

 Is there an automated way to convert a set of twitter users in a 3rd
 party application (i.e. usernames and passwords), into usable OAuth
 credentials?

 If not, this makes the transition difficult, both because additional
 user action is required and app logic needs to include provisions for
 different kinds of twitter accounts. That's translates to lots of
 friction for the whole twitter developer userbase.

 I'd be fine with a one-off mechanism that isn't open to an API but
 involves submitting a CSV file or something like it to a form.

 Thanks,
 Ivan
 http://tipjoy.com




-- 
Abraham Williams | http://the.hackerconundrum.com
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from: Madison Wisconsin United States.