tags:

views:

463

answers:

2

Twitter:

I must be blind, but how would I find out how many unread direct messages a certain user has?

I'm using this documentation: http://apiwiki.twitter.com/Twitter-API-Documentation

+3  A: 

Unread is a vaguely defined term. Unread is usually used in a specific client application. So, for instance, if you are using Twitterrific in two different machines with the same user account, both client instances will have different unread messages with respect to each other.

If you want to keep track of unread messages for your client, you must store the last message read ID. Each Twitter status is uniquely identified by a long number representing a global message ID, so it should not be difficult to accomplish.

Pablo Santa Cruz
Ok, I'm not working on a Twitter client in that sense.I guess in my case, I don't care if the user has used the Twitter website or any other client to read a message, I just want to know if a message is unread or not. Actually I'd be happy to find out something like "You have 2 unread messages at Twitter". Then I'll just provide a link to the Twitter website.
Jonny
No. You can't do that with twitter API. One thing you can do is, on your website, store the LAST MESSAGE ID you informed the user about, and act accordingly.
Pablo Santa Cruz
Well yes, but that would only mean that I can have my system remember the latest message id that was seen by my system. If the system discovers a new latest message id, the user might have already read the message in question with another Twitter client. As the answer below states, I guess what I'm asking isn't possible at this moment.
Jonny
+2  A: 

Currently, Twitter doesn't offer this functionality. There is no way, currently, for Twitter to store which direct messages(or mentions or statuses for that matter) a user has read or hasn't read.

Though I believe they are looking into it.

Eclipsed4utoo