I'm experimenting with this method "users lookup" from the Twitter API. Is there any way I can directly type the url in the browser and see the results? I am logged into Twitter, but I get the error message "basic authentication is not supported" when I type http://api.twitter.com/1/users/lookup.xml?user_id=12863272,3191321,9160152,8285392 (this is from their documentation page). What do I need to do to experiment with the API?
A:
Time Machine
2010-10-30 18:51:16
curl with copy-pasting? How?
2010-10-30 18:54:16
You need to copy and paste the OAuth tokens.
Time Machine
2010-10-30 18:54:55
Or even better: http://dev.twitter.com/console :D
Time Machine
2010-10-30 18:55:47
I didn't understand. I am using a script/cron job to get my data, so console wouldn't be useful to me. Is there any way to pass OAuth tokens in the URL?
2010-10-30 18:57:03
If using a script, simply install Twurl (option 3) and use Twurl. It's that simple.
Time Machine
2010-10-30 18:58:00
is there no way to not depend on external tools? I mean, is there any way to do the authentication from my script itself?
2010-10-30 19:02:41
Shell Script? Nopes, you need either cUrl or Twurl.
Time Machine
2010-10-30 19:05:17
ok, with CURL and PHP, is there any way to do it without depending on external tools?
2010-10-30 19:06:04
Yes. Use cUrl...
Time Machine
2010-10-30 19:07:07
if I do curl http://api.twitter.com/1/users/lookup.xml?user_id=12863272,3191321,9160152,8285392, I get an authentication error
2010-10-30 19:08:16
You first need to authenticate. http://dev.twitter.com/pages/auth
Time Machine
2010-10-30 19:11:04
Basic authentication which you are using is not available anymore.
Time Machine
2010-10-30 19:12:22
I didn't understand fully how I should use curl with oauth, I'll read through the oauth tutorial at twitter. thank you for your help.
2010-10-30 19:15:45
okay, I found the library - http://github.com/abraham/twitteroauth
2010-10-30 19:20:09