[twitter-dev] Re: Wrong User ID for a reply

2010-03-22 Thread S Wang
From the API documentation: 
http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search

Warning:  The user ids in the Search API are different from those in
the REST API (about the two APIs). This defect is being tracked by
Issue 214. This means that the to_user_id  and from_user_id field vary
from the actualy user id on Twitter.com. Applications will have to
perform a screen name-based lookup with the users/show method to get
the correct user id if necessary.
- Shuan

On Mar 22, 4:05 pm, Vikas vikas...@gmail.com wrote:
 Hi,

  I am trying to fetch the User ID to include in the Reply field and it
 fetches the correct user ID if you are following the person and some
 wrong User ID if you are just replying to a Tweet from the Search
 topics. Has anyone seen this kind of behavior and what could possibly
 be wrong here? I appreciate the help.

 Thanks
 Vikas

To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


[twitter-dev] Re: Search API fails with Chinese

2010-03-22 Thread S Wang
Pretty odd, I am able to use curl to get 
http://search.twitter.com/search.json?q=^_^lang=zh
but have the same problem as you fetching it through Firefox/Safari.

On Mar 22, 12:51 pm, Irokez iro...@gmail.com wrote:
 http://search.twitter.com/search.json?q=^_^lang=en - works 
 perfectlyhttp://search.twitter.com/search.json?q=^_^lang=zh - Twitter search
 has timed out
 Is there a way to solve the problem?

To unsubscribe from this group, send email to 
twitter-development-talk+unsubscribegooglegroups.com or reply to this email 
with the words REMOVE ME as the subject.


[twitter-dev] Re: Most popular tweets in the search API

2010-03-19 Thread S Wang
As someone who's developing some applications right now specifically
involving the search APIs I now have to worry about whether or not I
should pre-emptively include the result_type parameter so my app
doesn't become non-functioning when the changes are pushed to the
site. Why do the popular tweets have to be the default behavior in the
API?

On Mar 19, 7:42 am, funkatron funkat...@gmail.com wrote:
 So this would change the default behavior of the search API, which is
 currently to return recent results?

 If so, I think that's a bad idea. Better to offer the option than to
 change existing behavior when possible.

 --
 Ed Finklerhttp://funkatron.com
 Twitter:@funkatron
 AIM: funka7ron
 ICQ: 3922133
 XMPP:funkat...@gmail.com

 On Mar 19, 10:37 am, Taylor Singletary taylorsinglet...@twitter.com
 wrote:

  Hi Developers!

  The Search team is working on a beta project that returns the most popular
  tweets for a query, rather than only the most recent tweets. This is a beta
  project, but an important first step to surface the most popular tweets for
  users searching Twitter.

  You can expect many improvements as we tune and tweak our algorithms, but we
  want to give everyone a heads up so we can go over the implications for
  those consuming the search API.

  --- New attribute in the payload ---

  First of all there will be a new attribute in search result payloads. Since
  some tweets are popular for a given query while others are simply the most
  recent results that match the query, we are adding a metadata section to
  specify the type of result that a given result represents.

  So for a popular tweet the result_type in the metadata section will have
  the value popular.

  Example of a result with a popular tweet:

  {
      results:
      [
          {
              
  profile_image_url:http://a1.twimg.com/profile_images/668144840/Elizabeth_Web_normal.jpg;,
              created_at:Mon,15 Feb 2010 19:55:18 +,
              from_user:Elizabeth,
              to_user_id:null,
              text:It's the Griswold family trip to Joshua Tree Park!
  @rsarver @Devon @Jess @noradio @kevinweil,
              id:9153622261,
              from_user_id:106309,
              geo:null,
              iso_language_code:en,
              source:lt;a href=quot;http://www.atebits.com/;
  rel=quot;nofollowquot;gt;Tweetielt;/agt;,
              metadata:
              {
                  result_type: popular
              }
          }

        /* etc ... */

  }

  Results that are not popular and represent simply recent query matches will
  have the result_type in the metadata section with a value of recent.

  Example of a recent result:

  {
      results:
      [
          {
              
  profile_image_url:http://a3.twimg.com/profile_images/641350353/TimCheekFinger_normal.jpg;,
              created_at:Mon, 15 Feb 2010 23:42:45 +,
              from_user:timhaines,
              to_user_id:97776,
              text:@noradio Nice spot.,
              id:9160218997,
              from_user_id:159881,
              to_user:noradio,
              geo:null,
              iso_language_code:it,
              source:lt;a href=quot;http://www.atebits.com/;
  rel=quot;nofollowquot;gt;Tweetielt;/agt;,
              metadata:
              {
                  result_type: recent
              }
          },

        /* etc ... */

  }

  --- Results with popular tweets aren't ordered chronologically ---

  Until the popular tweet feature all search results have been sorted
  chronologically, most recent results at the top. If a search query has any
  popular results, those will be returned at the top, even if they are older
  than the other results.

  Example of a non-chronologically ordered set of results including popular
  results:

  {
      results:
      [
          {
              
  profile_image_url:http://a1.twimg.com/profile_images/668144840/Elizabeth_Web_normal.jpg;,
              created_at:Mon, 15 Feb 2010 19:55:18 +,
              from_user:Elizabeth,
              to_user_id:null,
              text:It's the Griswold family trip to Joshua Tree Park!
  @rsarver @Devon @Jess @noradio @kevinweil,
              id:9153622261,
              from_user_id:106309,
              geo:null,
              iso_language_code:en,
              source:lt;a href=quot;http://www.atebits.com/;
  rel=quot;nofollowquot;gt;Tweetielt;/agt;,
              metadata:
              {
                  result_type: popular
              }
          },
          {
              
  profile_image_url:http://a3.twimg.com/profile_images/641350353/TimCheekFinger_normal.jpg;,
              created_at:Mon, 15 Feb 2010 23:42:45 +,
              from_user:timhaines,
              to_user_id:97776,
              text:@noradio Nice spot.,
              id:9160218997,
              from_user_id:159881,
              to_user:noradio,
              geo:null,
              iso_language_code:it,
              source:lt;a