1) The sample resource returns a sampled stream, best for statistical
analysis and the like. The filtered resource returns a stream filtered by
the supplied predicates. You will mostly be using the filtered resource.

2) Retweets can be found with the follow parameter. See
http://apiwiki.twitter.com/Streaming-API-Documentation#follow. Mentions are
best found by using track on the account name. So, track jkalucki and you'll
see all tweets with jkalucki or @jkalucki in the text. Assume that you need
to do post processing on the stream

3) You should have two accounts (and thus streams) at elevated access
levels, one for follow and one for track, that perform the bulk of your
work. You should also use two accounts at default access level for follow
and track to find recent deltas without disrupting your main streams too
often. Once the default streams are "full", you'll have to cycle the main
streams.

4) I don't understand your question. In some cases you'll need to fall back
to the REST API to populate history before transitioning to the Streaming
API. In other cases you can just use the maximum supported count parameter
for your access level (note that track never supports count) and deduplicate
the results.

5) You can use the geo tag feature, but the volume is so low. We don't have
a feature in the Streaming API that allows selecting statuses by the
self-reported profile information yet.

-John Kalucki
http://twitter.com/jkalucki
Infrastructure, Twitter Inc.


On Sat, Jan 16, 2010 at 12:11 AM, Twitter-Developer <alamshe...@gmail.com>wrote:

> Dear Experts,
>
> Well I have been developing Twitter applicaiton for quite a long now
> and has been using Twitter Search API for my goals.
>
> Here is my business overview:
>
> I have subscribers over 20K. Have their profiles containing their
> interests keywords, location and other geographic information. I use
> oAuth for authentication and then get following information for each
> subscriber.
>
> 1. Mentions (Cache each mention locally)
> 2. Retweets (Cache each retweet locally)
> 3. Search tweets for subscriber interests using their keywords etc and
> location.
>
> All these activities are being performed periodically, where I use
> sinceId to fetch mentions, retweets, so that I may have historical
> data and do not lose any mention or retweet of the user.
>
> Now I have read the API documentation and can see Streaming API is the
> most recommended API by twitter. I want to convert my application to
> use Streaming API.
>
> So as I see, with the default access level, I can subscribe to
> statuses/sample or statuses/filter method using any of my account
> (using basic authentication) and can fetch whatever I want, as the
> nature of API is event based, this is definitely going to be fast.
>
> Here are few questions though:
>
> 1. What is the difference between sample and filter method? When to
> use which?
>
> 2. What is best approach to get the retweets and mentions? Is it
> tracking my subscribers screen names or just specify there user ids in
> follow predicate?
>
> 3: If I have 20,000 subscribers, that means, I have at least 20,000
> screen names to track or follow and suppose I have 3 keywords for each
> subscriber on average, that makes it 60,000 keywords to track as well,
> how to manage this?
>
> 4: If any of the subscriber changes location or keywords, I have to
> reconnect to update the predicates. right? I have read the
> documentation and can follow the best practices. However I am unable
> to understand the count variable logic. I want to see if any of the
> mentions or retweets is missing in my storage, what's the best
> approach to get it back?
>
> 5: How to track or follow based on users' location?
>
>
> So basically I am confused :) Any recommendations to move from here or
> quick answers to above will help.
>
> I'll be grateful for any help.
>
> Regards,
> Alam Sher
>
>
>
>

Reply via email to