Discussion on api-documentation

5 views
Skip to first unread message

ander...@abiro.com

unread,
Apr 20, 2007, 3:52:11 AM4/20/07
to Twitter Development Talk
Could you please add a specification for the responses from
friends_timeline and the other responses as well?

Thanks in advance.

Alex Payne

unread,
Apr 20, 2007, 9:16:41 PM4/20/07
to twitter-deve...@googlegroups.com
Will do, Anders.

--
Alex Payne
http://twitter.com/al3x

Message has been deleted
Message has been deleted
Message has been deleted

ander...@abiro.com

unread,
Apr 21, 2007, 12:55:32 PM4/21/07
to Twitter Development Talk
I fixed it, both ways. Even though the XML timeline says UTF-8 it
still seems to be pure Unicode, but maybe that's correct. The update
message should be in URL encoded UTF-8. Now my mobile Twitter client
can be used for any language (at least in theory). Hooray :).

Alex Payne

unread,
Apr 21, 2007, 2:44:39 PM4/21/07
to twitter-deve...@googlegroups.com
We'll look into what's correct, standards-wise, but I'm glad you
figured it out for your app, Anders. Good luck!

Message has been deleted

ander...@abiro.com

unread,
Apr 21, 2007, 5:44:42 PM4/21/07
to Twitter Development Talk
Note on authentication: e-mail address is not needed. Screen name
works fine.

Message has been deleted
Message has been deleted
Message has been deleted

Alex Payne

unread,
Apr 22, 2007, 3:44:37 PM4/22/07
to twitter-deve...@googlegroups.com
You need to be making this request while authenticated (and double-
check your URL) but you shouldn't need to set up Instant Messaging.


On Apr 22, 2007, at 12:39 AM, ander...@abiro.com wrote:

>
> direct_messages and new always return 404 "User not found". Should
> they work? Needed to set up Instant Messaging in my account?
>

Alex Payne

unread,
Apr 22, 2007, 3:49:34 PM4/22/07
to twitter-deve...@googlegroups.com
Fixed. Thank you, Anders. Feel free to correct the documentation
yourself in the future. I appreciate your detailed feedback.


On Apr 22, 2007, at 8:41 AM, ander...@abiro.com wrote:

>
> It's said early on that updates and direct messages need POST, but if
> so the syntax is wrong for 'update' and 'new' (arguments part of the
> URL). Also, it says at 'update' that it needs POST, but not at 'new'.
>

Alex Payne

unread,
Apr 22, 2007, 3:51:23 PM4/22/07
to twitter-deve...@googlegroups.com
I'm puzzled about this. The documentation currently shows that a
format is required, and we haven't had any reports of that not
working. There's no reason to stay away from direct messages via the
API; we have plenty of bots successfully using them.


On Apr 22, 2007, at 8:47 AM, ander...@abiro.com wrote:

>
> Also, the syntax for 'new' is wrong in that the file type is not shown
> in the URL.
>
> I'll stay away from direct messages for now.
>

ander...@abiro.com

unread,
Apr 23, 2007, 2:31:35 PM4/23/07
to Twitter Development Talk
I referred to an old version of the documentation, and sent to myself.
This works fine with the documented syntax. Sorry about that.

ander...@abiro.com

unread,
Apr 25, 2007, 2:29:02 AM4/25/07
to Twitter Development Talk
user_timeline for a given ID doesn't require basic authentication.
Right or wrong?

Mario Menti

unread,
Apr 25, 2007, 2:46:41 AM4/25/07
to twitter-deve...@googlegroups.com
On 4/25/07, ander...@abiro.com <ander...@abiro.com> wrote:
>
> user_timeline for a given ID doesn't require basic authentication.
> Right or wrong?

Since you can see a user's timeline on the web without being logged
into twitter (given they don't protect their updates), I go for
"right".

Mario.

ander...@abiro.com

unread,
Apr 25, 2007, 7:49:09 AM4/25/07
to Twitter Development Talk
True. Makes sense if the updates are not protected.

Alex Payne

unread,
Apr 25, 2007, 2:25:20 PM4/25/07
to twitter-deve...@googlegroups.com
Correct. We don't require authentication for the user_timeline and
friends_timeline of non-protected users. This is largely so that we
can implement our badges that pull from those API methods.

Bill Glover

unread,
Apr 29, 2007, 7:39:26 PM4/29/07
to Twitter Development Talk
I've written a little TweetSL "Tweetsule" client for Second Life that
can read (up to five) twitter entries from public or friends, but I
don't have the ability to do basic auth in the header, so I can't post
updates yet. The new Auth API will be great, but in the meantime could
you post the paramters for paramter based auth (even if it's
unsupported). I could use that for updates in the meantime.
Bill

Bill Glover

unread,
Apr 30, 2007, 4:19:46 AM4/30/07
to Twitter Development Talk
Ok duh. I didn't read the Fan Wiki entry on Basic Auth first. I've
never seen URL form of Basic Auth before, neat. For anyone following
along here's the example:
http://username:pass...@twitter.com/statuses/user_timeline.xml

Lode

unread,
May 2, 2007, 5:41:10 AM5/2/07
to Twitter Development Talk
Is there a way to get more than the last 20 updates? I'm working on
integrating twitter with my blog, and I'd like to import all my
updates. I've got a nice twitter plugin for wordpress, but alas the
api only gives 20 updates. Do I have to resort to writing a regular
expression and parsing the html pages, or is there a secret parameter
I can use to get the last "x" updates?

Guillaume

unread,
May 2, 2007, 5:44:08 PM5/2/07
to Twitter Development Talk
Hello,
I tried
> curl -v -u guillaume7:XXXX http://twitter.com/statuses/update.xml?status=Yo
I got
< HTTP/1.0 200 OK
for an answer, but I don't see my message updated in my http://twitter.com/home.
Am I doing something wrong?
Guillaume

Guillaume

unread,
May 2, 2007, 6:17:25 PM5/2/07
to Twitter Development Talk
> > curl -v -u guillaume7:XXXXhttp://twitter.com/statuses/update.xml?status=Yo

> Am I doing something wrong?

Got it!

> curl -v -d status=Hohoho -u guillaume7:XXXX http://twitter.com/statuses/update.xml

Sorry for bothering ya,
G.

Aral Balkan

unread,
May 5, 2007, 3:42:19 PM5/5/07
to Twitter Development Talk
Added a note regarding the return value of the featured call (JSON).

Click on http://groups.google.com/group/twitter-development-talk/web/api-documentation
- or copy & paste it into your browser's address bar if that doesn't
work.

Message has been deleted

redsmurph

unread,
May 7, 2007, 7:04:37 AM5/7/07
to Twitter Development Talk
I made a few changes:
- Added username to basic authentication. You might not want to
promote that, but it definitely works.
- Added XML response information to HTTP Requests. Don't know about
the other file types, but this should apply also to JSON.
- Made better paragraph separations.
- Fixed a few typos.

Alex Payne

unread,
May 7, 2007, 2:12:19 PM5/7/07
to twitter-deve...@googlegroups.com
Thanks, Anders! Contributions are always welcome.

edward.v...@gmail.com

unread,
May 8, 2007, 4:05:03 PM5/8/07
to Twitter Development Talk
Is there an API method to delete an individual private
message from the queue?

Ed

Alex Payne

unread,
May 8, 2007, 4:17:56 PM5/8/07
to twitter-deve...@googlegroups.com
Not at the moment, but I'll add that in. Thanks for the suggestion.

Aral Balkan

unread,
May 11, 2007, 3:36:56 PM5/11/07
to Twitter Development Talk
Could someone with admin privileges please revert the main API doc to
version 29. The HTML editor didn't like my adding an achor tag and
replicated it for every paragraph :(

Alex Payne

unread,
May 11, 2007, 3:44:49 PM5/11/07
to twitter-deve...@googlegroups.com
Done. No worries, Aral.

JJ Merelo

unread,
May 14, 2007, 4:28:46 AM5/14/07
to Twitter Development Talk
Any hint on how to send latin1 stuff as statuses? When I try something
like "Esto está cañón", even if the response from twitter is correct,
only "Esto est" will be shown in the status.

Alex Payne

unread,
May 14, 2007, 3:46:03 PM5/14/07
to twitter-deve...@googlegroups.com
I'd suggest URL encoding what you send to us. Seems to work for most
international users.

JJ Merelo

unread,
May 14, 2007, 4:34:40 PM5/14/07
to twitter-deve...@googlegroups.com


2007/5/14, Alex Payne <al...@al3x.net>:

I'd suggest URL encoding what you send to us.  Seems to work for most
international users.

The library I use, HTTP::Request::Common, does that automatically.

JJ

Cameron Kaiser

unread,
May 14, 2007, 6:39:42 PM5/14/07
to twitter-deve...@googlegroups.com
> > I'd suggest URL encoding what you send to us. Seems to work for most
> > international users.
>
> The library I use, HTTP::Request::Common, does that automatically.

Silly question, but the Perl you're using is fully UTF-8, right?

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Software sucks because users demand it to. -- Nathan Mhyrvold, Microsoft ---

JJ Merelo

unread,
May 15, 2007, 2:11:06 AM5/15/07
to Twitter Development Talk
OK, this seemed to do the trick:
--
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
use XML::Simple;
use utf8;

my $status = shift;
my $ua = LWP::UserAgent->new();
utf8::upgrade( $status );
my $req = POST 'http://aap_ugr:xxx...@twitter.com/statuses/
update.xml',
[ status => $status ];
my $res = $ua->request($req);
if ($res->is_success) {
my $respuesta=XMLin($res->content);
print "El mensaje ", $respuesta->{'text'}, " ha recibido el ID ",
$respuesta->{'id'}, "\n";
} else {
die $res->status_line;
}
--

JJ

keaton...@gmail.com

unread,
Jun 28, 2007, 5:04:38 PM6/28/07
to Twitter Development Talk
Umm, how would you find out the number of tweets a user has posted?

Alex Payne

unread,
Jun 28, 2007, 5:10:58 PM6/28/07
to twitter-deve...@googlegroups.com
See the users/show API method. It returns a statuses_count element
that contains the number of updates a user has posted.

On 6/28/07, keaton...@gmail.com <keaton...@gmail.com> wrote:
>
> Umm, how would you find out the number of tweets a user has posted?
>
>

BarryCarlyon

unread,
Jul 4, 2007, 8:09:39 PM7/4/07
to Twitter Development Talk
Greetings

im trying to use the http basic auth with php and i have had to luck,
using either fsocketopen. or indeed fopen.

Please Help

Barry Carlyon

Blaine Cook

unread,
Jul 7, 2007, 1:54:30 AM7/7/07
to Twitter Development Talk
Hi all,

I've made a (hopefully minor) change to the Twitter API. The /statuses/
friends method will now return a maximum of 100 friends, ordered by
the time of their most recent Twitter.

While it may, in some cases, be necessary to use the /statuses/friends
method call, we strongly recommend using /statuses/friends_timeline
instead. We haven't made any firm decisions, but my current thinking
is that the /statuses/friends method will be deprecated in favour of /
statuses/friends_timeline.

It would be very helpful for us if those of you with use cases for
the /statuses/friends method could provide a brief description of your
use case.

Thanks!

Blaine Cook
Twitter - http://twitter.com/blaine

Lance Weber

unread,
Jul 11, 2007, 1:56:42 PM7/11/07
to Twitter Development Talk
I've been wanting to see/write a Friend Recommendation service that
grabs a list of all my friends then scans their friend lists and
aggregates results giving me a list of recommended new friends
weighted by connections with current friends.

For that to work, I need to be able to get a complete list of friends
not just for the current authorized user, but any user. Is something
like this in the works? This really comes down to deciding to support
third party social network analytics efforts...

On Jul 6, 11:54 pm, Blaine Cook <rom...@gmail.com> wrote:
> Hi all,
>

> I've made a (hopefully minor) change to the Twitter API. The /statuses/friendsmethod will now return a maximum of 100friends, ordered by


> the time of their most recent Twitter.
>
> While it may, in some cases, be necessary to use the /statuses/friends
> method call, we strongly recommend using /statuses/friends_timeline
> instead. We haven't made any firm decisions, but my current thinking

> is that the /statuses/friendsmethod will be deprecated in favour of /


> statuses/friends_timeline.
>
> It would be very helpful for us if those of you with use cases for

> the /statuses/friendsmethod could provide a brief description of your


> use case.
>
> Thanks!
>
> Blaine Cook
> Twitter -http://twitter.com/blaine
>

> Click onhttp://groups.google.com/group/twitter-development-talk/web/api-docum...

Alex Payne

unread,
Jul 11, 2007, 4:19:49 PM7/11/07
to twitter-deve...@googlegroups.com
There are already a couple sites that do this for Twitter. My
favorite: http://twitter.caboo.se/

Ed Finkler

unread,
Jul 11, 2007, 11:03:14 PM7/11/07
to twitter-deve...@googlegroups.com
On 7/7/07, Blaine Cook <rom...@gmail.com> wrote:

> It would be very helpful for us if those of you with use cases for
> the /statuses/friends method could provide a brief description of your
> use case.

I like it from the standpoint of getting a list of all the
authenticated user's friends. In the new version of Spaz, I'm using
it to provide a sort of "directory" to the user, where they can click
on a user's avatar and get their profile info. If performance was an
issue, I'd be able to live without each friend's most recent status.

--
- Ed Finkler
http://funkatron.com/

Lance Weber

unread,
Jul 12, 2007, 4:02:38 PM7/12/07
to Twitter Development Talk
Okay, which API calls are they using to generate a list of UserX's
friends?


On Jul 11, 2:19 pm, Alex Payne <a...@al3x.net> wrote:
> There are already a couple sites that do this for Twitter. My
> favorite:http://twitter.caboo.se/
>
> --

> Alex Paynehttp://twitter.com/al3x

georg...@gmail.com

unread,
Jul 19, 2007, 6:41:22 PM7/19/07
to Twitter Development Talk
Hello,

I'm playing with the API. Everything works perfect so far. The only
thing that I could not make is displaying an arbitrary text of the
agent that posted the update. I see some people have it like "from
web", "from txt", "from twitterrific", etc. I've tried adding User
Agent header but it did not work. Any help would be much appreciated.

Thanks,
George

Mark Phillip

unread,
Jul 19, 2007, 6:45:12 PM7/19/07
to twitter-deve...@googlegroups.com

Hey Arlo, this is done on a case-by-case basis by the folks at Twitter.

 

Thanks,
Mark
areyouwatchingthis.com

Aral Balkan

unread,
Jul 27, 2007, 7:05:43 AM7/27/07
to Twitter Development Talk
The featured() method (JSON format) no longer returns a callback
function but the data itself so it's now consistent with the other
functions. I removed my note about this from the wiki. Thanks, guys!

Click on http://groups.google.com/group/twitter-development-talk/web/api-documentation

kentbr...@gmail.com

unread,
Aug 29, 2007, 1:12:33 PM8/29/07
to Twitter Development Talk
Hey, so I'm playing with this:

http://twitter.com/statuses/friends_timeline/bob.json?callback=foo

... which works as expected.When I try this, however:

http://twitter.com/statuses/friends_timeline/bob.json?callback=bar

... I still get my results wrapped in foo. I'm almost positive this is
not local caching at my end; cURL gives me the same results as my
browser, and it isn't caching anything.

While I understand the need to ease the load on Twitter's servers,
this will almost certainly break the experience for any user who
visits one site that depends on callback foo and then visits another
site that depends on callback bar, if both of those sites query for
the same friends_timeline. (Which is easy to do, for bob-the-example-
user.)

[after fiddling some more]

When I tried this:

http://twitter.com/statuses/friends_timeline/net.json

... and then this:

http://twitter.com/statuses/friends_timeline/net.json?callback=bob

... I got no callback with the second call, and when I tried this:

http://twitter.com/statuses/friends_timeline/kent.json?callback=foo

... and then this:

http://twitter.com/statuses/friends_timeline/kent.json

... I got the callback with the second call, even though I didn't ask
for it.

Thanks for building the API!

--Kent


kentbr...@gmail.com

unread,
Aug 29, 2007, 1:15:54 PM8/29/07
to Twitter Development Talk
Oh, almost forgot: it would be very nice if I could use dots and
square brackets in my callback name. Like so:

http://twitter.com/statuses/friends_timeline/bob.json?callback=mything.myfunc[0]

When I try this, I get mythingmyfunc0 back from the API as my
callback.

Thanks again,

--Kent

Alex Payne

unread,
Aug 29, 2007, 1:17:19 PM8/29/07
to twitter-deve...@googlegroups.com
Thanks for the detailed bug report, Kent. We'll look into it.

kentbr...@gmail.com

unread,
Aug 30, 2007, 7:13:00 PM8/30/07
to Twitter Development Talk
Hey, it would be great if calls like these:

http://twitter.com/friendships/create/tantek.json?callback=foo
http://twitter.com/friendships/destroy/tantek.json?callback=foo

... gave back error messages in the same format as their success
messages. If I do the wrong thing with either API, I get this:

You are not friends with the specified user.
You are already friends with the specified user.

... where I ought to get something like this:

foo({"error":"You are not friends with the specified user."});
foo({"error":"You are already friends with the specified user."});

Ditto the page that comes up when I hit Cancel or the three-try limit
on any call that pops up the auth box, like this one:

http://twitter.com/account/verify_credentials.format

Thanks again,

--Kent

Alex Payne

unread,
Aug 30, 2007, 9:22:08 PM8/30/07
to twitter-deve...@googlegroups.com
We do that in a couple places around the API, but I'll try to make
sure it's consistent. Thanks for the suggestion, Kent.

funkatron

unread,
Oct 4, 2007, 6:43:24 AM10/4/07
to Twitter Development Talk
User 'JJJrg' replaced the entire page of docs with a spam link. I
couldn't sort out a way to roll back the whole change, so for now I
just saved a new version over it. Alex, maybe you can do that?

http://groups.google.com/group/twitter-development-talk/web/api-documentation

Ed Finkler

unread,
Oct 4, 2007, 6:48:48 AM10/4/07
to Twitter Development Talk
Actually, it looks like he did it to all four pages. Classy. I did the
same to the other three.


--
--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron

Alex Payne

unread,
Oct 4, 2007, 12:41:11 PM10/4/07
to twitter-deve...@googlegroups.com
Thanks, Ed. I've reverted all the pages. Some people.

kulde...@gmail.com

unread,
Oct 8, 2007, 8:04:10 AM10/8/07
to Twitter Development Talk
Hi,
Is there any way we can send direct messages with HTML tags. e.g.
Anchor tag.

Thanks
Kuldeep

Cameron Kaiser

unread,
Oct 8, 2007, 10:36:54 AM10/8/07
to twitter-deve...@googlegroups.com
> Is there any way we can send direct messages with HTML tags. e.g.
> Anchor tag.

This is in the archive, but in the past the developers have stated there
are no plans to allow it for security reasons.

If you want a link, the easiest thing is just to send a URL and let the
Twitter parser recognize it.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com

-- FORTUNE: Good day for heavy drinking. Start spiking the office water cooler.

thomas...@gmail.com

unread,
Oct 25, 2007, 12:40:12 PM10/25/07
to Twitter Development Talk
Is there a method in here to pluck a certain piece of data (like a
regular expression) from a twit, or is it just assumed that if we
wanted it we could construct our own by analyzing message text?

Alex Payne

unread,
Oct 25, 2007, 1:10:32 PM10/25/07
to twitter-deve...@googlegroups.com
Extracting data from our API responses is left as an exercise for the
developer :)

Jacobr

unread,
Dec 25, 2007, 2:57:40 PM12/25/07
to Twitter Development Talk
http://twitter.com/direct_messages.xml is returning HTTP:

Here's my header - but I'm CERTAIN that I'm calling

http://twitter.com/direct_messages.xml

Any suggestions?

HTTP/1.1 200 OK Connection: close Expires: Tue, 25 Dec 2007 20:00:41
GMT Date: Tue, 25 Dec 2007 19:55:41 GMT Server: hi X-Runtime: 0.45907
Vary: Accept-Encoding Status: 200 OK Cache-Control: private, max-
age=0, must-revalidate, max-age=300 Set-Cookie:
_twitter_session=1c057dbb2030c10649e8aaeefb040089;
domain=.twitter.com; path=/ ETag: "5e987f7eda84b74d2e501484ca7d2cce"
P3P: CP="NOI DSP COR NID ADMa OPTa OUR NOR" Via: 1.1
jatayu.twitter.com Content-Type: text/html; charset=utf-8

rads

unread,
Jan 4, 2008, 12:30:53 AM1/4/08
to Twitter Development Talk
using the befriend method i can follow a twitterid, likewise is there
any method to switch on the notifications for the twitterid whom im
following??

jbos...@gmail.com

unread,
Jan 4, 2008, 9:53:46 AM1/4/08
to Twitter Development Talk
Hi, I'm creating a Java based client side swing app which should
provide easy access to your functionality from inside a number of
OS's, however as my caching is far from optimal (can't do it all at
once right :)), debugging my app makes me run into your max transfer
limit. I doubt I'm making zillions of requests, but more than 70/hour
(due to the caching at app startup).

Can we work this out?

Thanks a lot in advance and keep up the good work :)

Jonathan

Alex Payne

unread,
Jan 4, 2008, 2:59:55 PM1/4/08
to twitter-deve...@googlegroups.com
Please email me off-list if you'd like to discuss being placed on the
whitelist. Thanks!

spaz...@gmail.com

unread,
Jan 16, 2008, 11:26:59 PM1/16/08
to Twitter Development Talk
Is there a method available to find out if you are following someone?
I know that I can get a list of my followers, and then pull their
status to find out, but that's two separate function calls. I'd like
to know if it's possible to have a <following> XML (or whatever) tag
added to the followers call, so I can see if I'm already reciprocating.

Alex Payne

unread,
Jan 17, 2008, 12:47:16 PM1/17/08
to twitter-deve...@googlegroups.com
Such an attribute is in the works. Thanks for the suggestion!

spaz...@gmail.com

unread,
Jan 18, 2008, 8:41:30 PM1/18/08
to Twitter Development Talk
Dare I ask when it might be available? A "soon" or "not so soon"
would be fine. =)

Alex Payne

unread,
Jan 18, 2008, 8:47:29 PM1/18/08
to twitter-deve...@googlegroups.com
Sooner than a month!

On 1/18/08, spaz...@gmail.com <spaz...@gmail.com> wrote:
>
> Dare I ask when it might be available? A "soon" or "not so soon"
> would be fine. =)
>

Terry Jones

unread,
Jan 19, 2008, 1:16:29 PM1/19/08
to twitter-deve...@googlegroups.com
>>>>> "spazholio" == spazholio <spaz...@gmail.com> writes:
spazholio> Dare I ask when it might be available? A "soon" or "not so
spazholio> soon" would be fine. =)

This reminds me of a question asked of Boris Yeltsin, something like "How
are things in Russia?" or "How is the Russian economy?" (See google for
differing accounts).

Yeltsin replied "Good." Asked if he could expand, he said "Not good."

Terry

Reply all
Reply to author
Forward
0 new messages