Is this a problem in the Twitter Search API code?

Discussion in 'Twitter' started by Evolve24Dev, Apr 3, 2013.

  1. #1
    I make a call to the API and get 100 Tweets back with this URL:
    https://api.twitter.com/1.1/search/tweets.json?result_type=recent&q=glyphosate&count=100

    I use the since_id and maxId from the response to build the next URL
    https://api.twitter.com/1.1/search/tweets.json?since_id=317299153090797569&q=glyphosate&result_type=recent&include_entities=1&count=100&maxId=317299153090797568

    That call returns the same 100 Tweets that the first call returned. My understanding is that since I am using since_id and maxId that I should get the next 100 with no duplicates.

    If I make a third or fourth call I still get back the same 100 Tweets. Here is the URL from my third call:
    https://api.twitter.com/1.1/search/tweets.json?since_id=317304633661997057&q=glyphosate&result_type=recent&include_entities=1&count=100&maxId=317304633661997056

    Is there something that I am doing wrong?

    Thank YouI
     
    Evolve24Dev, Apr 3, 2013 IP
  2. Montreal Classifieds

    Montreal Classifieds Active Member

    Messages:
    808
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    60
    #2
    As far as I see it, maxId represents tweets with IDs lower than maxId. since_id represents tweets with ID bigger thatn since_id. In your example maxId-since_id=1
    May be in this case twitter brings first 100.
     
    Montreal Classifieds, Apr 3, 2013 IP