You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by Richard Hirsch <hi...@gmail.com> on 2010/05/23 08:47:44 UTC

Twitter api Up-to-Date?

I just finished using Tweetdeck to access ESME (details here:
http://status.net/2010/05/21/tweetdeck-supports-statusnet)  and I noticed
that we can send send messages via the twitter api but the personal timeline
appears to be broken:

62.47.190.106 - h [23/May/2010:06:41:12 +0000] "GET
/twitter/statuses/replies.xml?count=100 HTTP/1.1" 200 2744
"app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+
(KHTML, like Gecko) AdobeAIR/1.5.3"
62.47.190.106 - h [23/May/2010:06:41:33 +0000] "GET
/twitter/statuses/home_timeline.xml?count=100 HTTP/1.1" 404 276
"app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+
(KHTML, like Gecko) AdobeAIR/1.5.3"

D.

Re: Twitter api Up-to-Date?

Posted by Vassil Dichev <vd...@apache.org>.
> I've tried the twitter api and I think some of the queries to retrieve
> messages are incorrect.  For example, the home_timeline returns just
> messages that I've composed rather than my messages plus messages from

Correction: your fix should have been friends_timeline rather than
user_timeline, as this is the closest we can get. From the Twitter API
(http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-home_timeline):

    This home_timeline is identical to statuses/friends_timeline
except it also contains retweets, which statuses/friends_timeline does
not (for backwards compatibility reasons).

> people I follow.  "Mentions" returns my messages + those from people I
> follow rather than messages that are replies to my user.  I'm looking
> at it and trying to find ways to correct it.

Hmm, we don't have "mentions", we have "replies"
(http://svn.apache.org/repos/asf/incubator/esme/trunk/server/src/main/scala/org/apache/esme/api/TwitterAPI.scala),
which is deprecated and removed in the TwitterAPI. What I think
happens is that in the DB every message in a conversation is marked as
a reply to the original one.

There is certainly some impedance mismatch between what ESME and
Twitter offer conceptually, some can be fixed, but some features can't
be mapped directly.

Vassil

Re: Twitter api Up-to-Date?

Posted by Richard Hirsch <hi...@gmail.com>.
I've tried the twitter api and I think some of the queries to retrieve
messages are incorrect.  For example, the home_timeline returns just
messages that I've composed rather than my messages plus messages from
people I follow.  "Mentions" returns my messages + those from people I
follow rather than messages that are replies to my user.  I'm looking
at it and trying to find ways to correct it.

D.

On Wed, May 26, 2010 at 7:27 AM, Vassil Dichev <vd...@apache.org> wrote:
> Right, the Twitter API ignores additional parameters because the few
> Twitter clients that I've tested didn't use them. Next item on the
> todo list.
>
> And yes, home_timeline is new (since after Twitter introduced
> retweets), so it wasn't there when the API was developed. I guess
> there's some catching up to do.
>
> By the way, good call on adding the missing functionality in there!
>
> Vassil
>
>
> On Tue, May 25, 2010 at 8:13 PM, Richard Hirsch <hi...@gmail.com> wrote:
>> I added the two lines (I'll commit them tomorrow) and yu can now
>> receive messages via tweetdeck.
>>
>> Next problem:  since-id needs to be used to make the follow-up query
>>
>> 93.82.138.33 - h [25/May/2010:17:09:51 +0000] "GET
>> /twitter/statuses/home_timeline.xml?count=100&since%5Fid=7673
>> HTTP/1.1" 200 14002
>>
>> D.
>>
>> On Sun, May 23, 2010 at 1:22 PM, Richard Hirsch <hi...@gmail.com> wrote:
>>> This might actually work if we added the following lines to the
>>> TwitterAPI.scala file.
>>>
>>> case Req(ApiPath ::> "statuses" ::> "home_timeline", this.method,
>>> GetRequest) => userTimeline
>>> case Req(ApiPath ::> "statuses" ::> "home_timeline" ::> last,
>>> this.method, GetRequest) => () => userTimeline(last)
>>>
>>> One problem is that the returned # of messages is hardcoded in scala
>>> with "20" whereas the latest twitter api has the ability to pass the
>>> value with the 'count' parameter.
>>>
>>> D.
>>>
>>> On Sun, May 23, 2010 at 8:47 AM, Richard Hirsch <hi...@gmail.com> wrote:
>>>>
>>>> I just finished using Tweetdeck to access ESME (details here: http://status.net/2010/05/21/tweetdeck-supports-statusnet)  and I noticed that we can send send messages via the twitter api but the personal timeline appears to be broken:
>>>>
>>>> 62.47.190.106 - h [23/May/2010:06:41:12 +0000] "GET /twitter/statuses/replies.xml?count=100 HTTP/1.1" 200 2744 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>>>> 62.47.190.106 - h [23/May/2010:06:41:33 +0000] "GET /twitter/statuses/home_timeline.xml?count=100 HTTP/1.1" 404 276 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>>>>
>>>> D.
>>>
>>
>

Re: Twitter api Up-to-Date?

Posted by Vassil Dichev <vd...@apache.org>.
Right, the Twitter API ignores additional parameters because the few
Twitter clients that I've tested didn't use them. Next item on the
todo list.

And yes, home_timeline is new (since after Twitter introduced
retweets), so it wasn't there when the API was developed. I guess
there's some catching up to do.

By the way, good call on adding the missing functionality in there!

Vassil


On Tue, May 25, 2010 at 8:13 PM, Richard Hirsch <hi...@gmail.com> wrote:
> I added the two lines (I'll commit them tomorrow) and yu can now
> receive messages via tweetdeck.
>
> Next problem:  since-id needs to be used to make the follow-up query
>
> 93.82.138.33 - h [25/May/2010:17:09:51 +0000] "GET
> /twitter/statuses/home_timeline.xml?count=100&since%5Fid=7673
> HTTP/1.1" 200 14002
>
> D.
>
> On Sun, May 23, 2010 at 1:22 PM, Richard Hirsch <hi...@gmail.com> wrote:
>> This might actually work if we added the following lines to the
>> TwitterAPI.scala file.
>>
>> case Req(ApiPath ::> "statuses" ::> "home_timeline", this.method,
>> GetRequest) => userTimeline
>> case Req(ApiPath ::> "statuses" ::> "home_timeline" ::> last,
>> this.method, GetRequest) => () => userTimeline(last)
>>
>> One problem is that the returned # of messages is hardcoded in scala
>> with "20" whereas the latest twitter api has the ability to pass the
>> value with the 'count' parameter.
>>
>> D.
>>
>> On Sun, May 23, 2010 at 8:47 AM, Richard Hirsch <hi...@gmail.com> wrote:
>>>
>>> I just finished using Tweetdeck to access ESME (details here: http://status.net/2010/05/21/tweetdeck-supports-statusnet)  and I noticed that we can send send messages via the twitter api but the personal timeline appears to be broken:
>>>
>>> 62.47.190.106 - h [23/May/2010:06:41:12 +0000] "GET /twitter/statuses/replies.xml?count=100 HTTP/1.1" 200 2744 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>>> 62.47.190.106 - h [23/May/2010:06:41:33 +0000] "GET /twitter/statuses/home_timeline.xml?count=100 HTTP/1.1" 404 276 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>>>
>>> D.
>>
>

Re: Twitter api Up-to-Date?

Posted by Richard Hirsch <hi...@gmail.com>.
I added the two lines (I'll commit them tomorrow) and yu can now
receive messages via tweetdeck.

Next problem:  since-id needs to be used to make the follow-up query

93.82.138.33 - h [25/May/2010:17:09:51 +0000] "GET
/twitter/statuses/home_timeline.xml?count=100&since%5Fid=7673
HTTP/1.1" 200 14002

D.

On Sun, May 23, 2010 at 1:22 PM, Richard Hirsch <hi...@gmail.com> wrote:
> This might actually work if we added the following lines to the
> TwitterAPI.scala file.
>
> case Req(ApiPath ::> "statuses" ::> "home_timeline", this.method,
> GetRequest) => userTimeline
> case Req(ApiPath ::> "statuses" ::> "home_timeline" ::> last,
> this.method, GetRequest) => () => userTimeline(last)
>
> One problem is that the returned # of messages is hardcoded in scala
> with "20" whereas the latest twitter api has the ability to pass the
> value with the 'count' parameter.
>
> D.
>
> On Sun, May 23, 2010 at 8:47 AM, Richard Hirsch <hi...@gmail.com> wrote:
>>
>> I just finished using Tweetdeck to access ESME (details here: http://status.net/2010/05/21/tweetdeck-supports-statusnet)  and I noticed that we can send send messages via the twitter api but the personal timeline appears to be broken:
>>
>> 62.47.190.106 - h [23/May/2010:06:41:12 +0000] "GET /twitter/statuses/replies.xml?count=100 HTTP/1.1" 200 2744 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>> 62.47.190.106 - h [23/May/2010:06:41:33 +0000] "GET /twitter/statuses/home_timeline.xml?count=100 HTTP/1.1" 404 276 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>>
>> D.
>

Re: Twitter api Up-to-Date?

Posted by Richard Hirsch <hi...@gmail.com>.
This might actually work if we added the following lines to the
TwitterAPI.scala file.

case Req(ApiPath ::> "statuses" ::> "home_timeline", this.method,
GetRequest) => userTimeline
case Req(ApiPath ::> "statuses" ::> "home_timeline" ::> last,
this.method, GetRequest) => () => userTimeline(last)

One problem is that the returned # of messages is hardcoded in scala
with "20" whereas the latest twitter api has the ability to pass the
value with the 'count' parameter.

D.

On Sun, May 23, 2010 at 8:47 AM, Richard Hirsch <hi...@gmail.com> wrote:
>
> I just finished using Tweetdeck to access ESME (details here: http://status.net/2010/05/21/tweetdeck-supports-statusnet)  and I noticed that we can send send messages via the twitter api but the personal timeline appears to be broken:
>
> 62.47.190.106 - h [23/May/2010:06:41:12 +0000] "GET /twitter/statuses/replies.xml?count=100 HTTP/1.1" 200 2744 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
> 62.47.190.106 - h [23/May/2010:06:41:33 +0000] "GET /twitter/statuses/home_timeline.xml?count=100 HTTP/1.1" 404 276 "app:/TweetDeck.swf" "Mozilla/5.0 (Windows; U; de-DE) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5.3"
>
> D.