0

I'm creating an app for Q&A that unifies twitter mentions/DMs, facebook wall posts/messages, as well as email and sms into one inbox. I know how I'm going to handle the SMS (storing each incoming message and outgoing response), but I'm wondering if it's realistic to apply the same methodology to twitter/facebook messages.

I figure I need to store them so I can at least mark them read/unread. Is this how TweetDeck does it? I can't imagine them polling the API constantly without caching anything.

By the way if you know of an app that does this already that would be fantastic. Hootsuite does everything but SMS and email oddly.

4

1 に答える 1

1

Assuming you're building a mobile app (since you mention SMS), if you're aiming to support arbitrary Facebook & Twitter accounts (ie including very busy ones) & use over a long period of time, then you can't store all the tweets & posts on the mobile device: this storage required would grow over time to exceed the capacity of any device.

You can store a reasonable number of "recent" tweets/posts in full; these form the backing model for your UI's views. When the user navigates past either end you can retrieve more via the APIs, and you'll perform housekeeping on this collection so it doesn't get too big, discarding older ones as necessary.

(This collection may end up being gappy: eg if I haven't run the app for a week, when I start it it would retrieve the most recent day's content, leaving a gap between yesterday's content & that of a week ago. Twitter's apps do this & show the gaps, allowing the user to fill them in via the APIs.)

If you need to keep track of read/unread status, you could store this & the unique id for a larger number of items; but again, you'll eventually need to purge these too.

You might want to look at the Twitter User Streams feature; Facebook's Realtime Updates isn't as well-suited for mobile apps (unless backed by your own server).

于 2013-01-28T06:57:24.847 に答える