SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Twitter API -- weird authentication problems....

    this is weird...

    Code:
    $tweetSearch = $TwitterConn->get('https://api.twitter.com/1.1/search/tweets.json?q='.$searchForThis.'&result_type=recent&count=100&include_entities=true&');
    works fine..

    Code:
    $tweetSearch = $TwitterConn->get('https://api.twitter.com/1.1/search/tweets.json?q='.$searchForThis.'&result_type=recent&count=100&include_entities=true&count=1');
    works fine..

    Code:
    $tweetSearch = $TwitterConn->get('https://api.twitter.com/1.1/search/tweets.json?q='.$searchForThis.'&result_type=recent&count=100&include_entities=true&count=2');
    get authentication problems.... essentially any count value above 1 gives me this auth error.....

    is this weird or what?

    error I get:

    {"errors":[{"message":"Could not authenticate you","code":32}]}
    I can't possibly print all results.. the resulting JSON is so long that when I put it in JSON Lint in FF the browser freaks out....

    thank you....

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,140
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    Huh? your first example has &count=100
    your second has &count=1
    but your third has &count=100 and &count=2

    Seems the second &count would overwrite the first, but perhaps it's considered an invalid syntax and refuses to authenticate?

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    oh my gosh... I hadn't seen the "count=100" in this url..

    (I'm trying out about four different urls (two of them have been deprecated...) and hadn't noticed this one had the "count=100" param in there.. none of the others did.......)

    oh brother... it's too late... I need to continue tomorrow....;-)

    thank you.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •