[twitter-dev] Searching for tweets containing a specific domain

2010-09-21 Thread Eric Marcoullier @ Gnip
If you query search.twitter.com for a specific domain, such as
techcrunch.com, you'll get a list of all tweets that contain that
domain, even if it's contained in a shortened URL.  Using domains as
predicates in Streaming Track doesn't result in the same behavior,
only matching on actual body text as opposed to metadata.

What is the most effective strategy to consume a feed of domain-
specific tweets at this point?

Thanks!
Eric

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] User Streams and Desktop Apps

2010-07-08 Thread Eric Marcoullier @ Gnip
Working on an app that could definitely benefit from User Streams and
wanted to know what qualifies as a "Desktop App"?  Is it specifically
an Air or Silverlight app installed on the desktop or is it more
indicative of a certain set of behaviors / access needs?  If the
latter, can a "web" app with the same usage characteristics be qualify
as a desktop app?

Cheers!
Eric


[twitter-dev] Re: Find Location where tweet came from

2010-02-12 Thread Eric Marcoullier @ Gnip
Raffi -- you are absolutely correct.  It turns out it's a frequency
thing.  I've done a whole bunch of random looks at result data in the
last couple of months and I've never seen one.  Now that I know what
to look for, I just grabbed a batch of 50,000 search results and found
several.

Many apologies for any work you had to do to drop some knowledge on
me :)

Eric

On Feb 12, 9:22 am, Raffi Krikorian  wrote:
> hi eric.
>
> just to make sure i understand what you're saying - you're saying that the
> geo tag (from the geotagging API) is not showing up from search?  i beg to
> disagree
>
> deskdog:Desktop raffi$ *curlhttp://search.twitter.com/search.json?q=tomcoates*
> {
>     "results":
>     [
>       ...
>         {
>             
> "profile_image_url":"http://a1.twimg.com/profile_images/523070730/twitterProfilePhoto_norm...
> ",
>             "created_at":"Fri,
>              12 Feb 2010 05:05:51 +",
>             "from_user":"vicchi",
>             "to_user_id":1292126,
>             "text":"@tomcoates You did really well today. Rest. Relax. Blog.
> Sleep. See you tomorrow.",
>             "id":8995500197,
>             "from_user_id":59842,
>             "to_user":"tomcoates",
>             *"geo":*
> *            {*
> *                "type":"Point",*
> *                "coordinates":*
> *                [*
> *                    37.2655,*
> *                    -121.9648*
> *                ]*
> *            },*
>             "iso_language_code":"en",
>             "source":"<a href="http://www.tweetdeck.com/";
> rel="nofollow">TweetDeck</a>"
>         },
> ...
>     "max_id":9014080861,
>     "since_id":0,
>     "refresh_url":"?since_id=9014080861&q=tomcoates",
>     "next_page":"?page=2&max_id=9014080861&q=tomcoates",
>     "results_per_page":15,
>     "page":1,
>     "completed_in":0.053853,
>     "query":"tomcoates"
>
> }
>
> seems to be working for me?
>
> On Fri, Feb 12, 2010 at 6:59 AM, Eric Marcoullier @ Gnip <
>
>
>
> e...@marcoullier.com> wrote:
> > I apologize if this has been previously covered, but it appears that
> > explicit geotag info is not shown for any tweet returned via the
> > search API, regardless of whether a user has authorized public geo
> > reporting.
>
> > As a result, it is possible to determine what is being said in a
> > specific location, but it is not possible to determine where people
> > are talking about a specific subject.
>
> > I understand you not wanting to show all the signals that lead to a
> > geo search match, but I can't grok why you're witholding specific
> > metadata from the search results.
>
> > Any light you can shed would be valuable to my customers. Any plans to
> > change this policy would be rad.
>
> > Thanks!
> > Eric
>
> > (on my iPhone. Sorry for typeos)
>
> > On Feb 11, 8:20 pm, Raffi Krikorian  wrote:
> > > each user has a location field associated with it - but that is self
> > > reported.
>
> > > On Thu, Feb 11, 2010 at 2:17 PM, don  wrote:
> > > > Thanks for the reply. Thats what I was thinking.
>
> > > > Would there be any way to return the location data of user with the
> > > > search results for a word?
>
> > > > So that I didn't need to make seperate calls for each user?
>
> > > > thanks so much for your help.
>
> > > > On Feb 12, 3:20 am, Raffi Krikorian  wrote:
> > > > > twitter only returns data back in its "geo" field if the tweet has
> > been
> > > > > explicitly geotagged.
>
> > > > > search, however, attempts to use other signals to determine where the
> > > > tweet
> > > > > is, and will attempt to return "more" tweets when you use its
> > "search"
> > > > > parameter.  it does not, however, expose those signals in the search
> > > > > results.
>
> > > > > On Wed, Feb 10, 2010 at 1:39 PM, don  wrote:
> > > > > > Hi All,
>
> > > > > > I'm trying to determine the location where a tweet came from.
>
> > > > > > I know you can do a search specifying the location you want to look
> > at
> &

[twitter-dev] Re: Find Location where tweet came from

2010-02-12 Thread Eric Marcoullier @ Gnip
I apologize if this has been previously covered, but it appears that
explicit geotag info is not shown for any tweet returned via the
search API, regardless of whether a user has authorized public geo
reporting.

As a result, it is possible to determine what is being said in a
specific location, but it is not possible to determine where people
are talking about a specific subject.

I understand you not wanting to show all the signals that lead to a
geo search match, but I can't grok why you're witholding specific
metadata from the search results.

Any light you can shed would be valuable to my customers. Any plans to
change this policy would be rad.

Thanks!
Eric

(on my iPhone. Sorry for typeos)

On Feb 11, 8:20 pm, Raffi Krikorian  wrote:
> each user has a location field associated with it - but that is self
> reported.
>
>
>
>
>
> On Thu, Feb 11, 2010 at 2:17 PM, don  wrote:
> > Thanks for the reply. Thats what I was thinking.
>
> > Would there be any way to return the location data of user with the
> > search results for a word?
>
> > So that I didn't need to make seperate calls for each user?
>
> > thanks so much for your help.
>
> > On Feb 12, 3:20 am, Raffi Krikorian  wrote:
> > > twitter only returns data back in its "geo" field if the tweet has been
> > > explicitly geotagged.
>
> > > search, however, attempts to use other signals to determine where the
> > tweet
> > > is, and will attempt to return "more" tweets when you use its "search"
> > > parameter.  it does not, however, expose those signals in the search
> > > results.
>
> > > On Wed, Feb 10, 2010 at 1:39 PM, don  wrote:
> > > > Hi All,
>
> > > > I'm trying to determine the location where a tweet came from.
>
> > > > I know you can do a search specifying the location you want to look at
> > > > and this checks againist any geo data and then against the location
> > > > data. I'm guessing that twitter does a lot of error checking and
> > > > transforms the location data into a geo coord on the backend when you
> > > > do this search.
>
> > > > My question is: if I do a search for say a "word" and get my results
> > > > back I want to be able to check where each of the returned tweets came
> > > > from. Not just using the geo data that the user may have allowed but
> > > > also the location data (just like the search for location based tweets
> > > > does).
>
> > > > Essentially getting back a geo coord for each tweet if there is any
> > > > releveant geo data or location data given by the tweeter.
>
> > > > this site would be doing something similar:http://trendsmap.com/
>
> > > > any ideas? sorry if this is really obvious, I have searched and just
> > > > can't find it.
>
> > > > thanks
> > > > don
>
> > > --
> > > Raffi Krikorian
> > > Twitter Platform Teamhttp://twitter.com/raffi
>
> --
> Raffi Krikorian
> Twitter Platform Teamhttp://twitter.com/raffi


[twitter-dev] Re: Ambiguity with 401 error response code

2009-12-29 Thread Eric Marcoullier @ Gnip
Heya, this will definitely work for now.  Thanks for the good idea.

Eric

On Dec 29, 10:45 am, Raffi Krikorian  wrote:
> hi eric.
>
> yup - you've hit it right on the head.  one of the main initiatives in us
> starting to version our API is so that we can really consolidate and make
> our error codes consistent.  unfortunately, for legacy compatibility
> reasons, we can't change the second case to have a 402 error and we will
> have to keep it as a 401.
>
> what you could do is parse the response that comes back in the 401, however.
>  in the case that your password is wrong, the error should be
>
> "Could not authenticate you."
>
> for basic auth and OAuth. the second case has an error of
>
> "Not authorized"
>
> On Mon, Dec 28, 2009 at 3:38 PM, Eric Marcoullier @ Gnip <
>
>
>
> e...@marcoullier.com> wrote:
> > We're trying to build some logic into our data collector and we've
> > been fighting with an issue for a while involving the 401
> > "Unauthorized" error code.
>
> > There are two instances where I can get this response
>
> > 1) Bad credentials.  I try to log in with an invalid username or
> > password.
> > 2) I don't have access to a specific user's private account.
>
> > The former can be a real problem for a user.  I changed my password a
> > few weeks ago and forgot that I was using it for whitelisted REST API
> > access.  Querying three times in rapid succession with a bad password
> > causes a temporary lockdown of a user's account.  I was querying once
> > per second and locked the account for a five days.  This is an account-
> > level issue and the proper way to deal with this from our perspective
> > is to immediately sleep the poller for 30 minutes and send an alert
> > about bad credentials.
>
> > This is completely different than if someone I'm following has taken
> > their account private.  In this case, sleeping for 30 minutes (or any
> > amount of time, really) is overkill.  Unless I'm querying for a single
> > person over and over, there's no reason to pause before moving onto
> > the next rule that I'm querying for.
>
> > Unfortunately, we have no way to disambiguate between the two 401s and
> > we're forced to either lock someone's account (ignoring 401s) or
> > severely reduce their polling efficiency (acting on 401s).
>
> > Best case would be to break these two error conditions out into
> > separate error codes.  Perhaps a 401 for bad credentials and a 402 for
> > lack of authorization for a specific piece of content.
>
> > Please let know if I've overlooked something that would help me
> > disambiguate the use cases in the current system.
>
> > Thanks!
> > Eric
>
> --
> Raffi Krikorian
> Twitter Platform Teamhttp://twitter.com/raffi


[twitter-dev] Ambiguity with 401 error response code

2009-12-29 Thread Eric Marcoullier @ Gnip
We're trying to build some logic into our data collector and we've
been fighting with an issue for a while involving the 401
"Unauthorized" error code.

There are two instances where I can get this response

1) Bad credentials.  I try to log in with an invalid username or
password.
2) I don't have access to a specific user's private account.

The former can be a real problem for a user.  I changed my password a
few weeks ago and forgot that I was using it for whitelisted REST API
access.  Querying three times in rapid succession with a bad password
causes a temporary lockdown of a user's account.  I was querying once
per second and locked the account for a five days.  This is an account-
level issue and the proper way to deal with this from our perspective
is to immediately sleep the poller for 30 minutes and send an alert
about bad credentials.

This is completely different than if someone I'm following has taken
their account private.  In this case, sleeping for 30 minutes (or any
amount of time, really) is overkill.  Unless I'm querying for a single
person over and over, there's no reason to pause before moving onto
the next rule that I'm querying for.

Unfortunately, we have no way to disambiguate between the two 401s and
we're forced to either lock someone's account (ignoring 401s) or
severely reduce their polling efficiency (acting on 401s).

Best case would be to break these two error conditions out into
separate error codes.  Perhaps a 401 for bad credentials and a 402 for
lack of authorization for a specific piece of content.

Please let know if I've overlooked something that would help me
disambiguate the use cases in the current system.

Thanks!
Eric