search - Twitter API 1.1 Illegal string offset 'statuses' -


im running twitter api v1.1.

        $tweets= $connection->get("https://api.twitter.com/1.1/search/tweets.json?q=".$searchstring."&result_type=mixed&rpp=100&count=".$notweets);          $twitter=json_encode($tweets);          ($i = 0; $i < sizeof($twitter["statuses"]); $i++) {            echo $twitter["statuses"][$i];         } 

warning: illegal string offset 'statuses'

why wrong offset?

https://dev.twitter.com/docs/api/1.1/get/search/tweets

    $tweets= $connection->get("https://api.twitter.com/1.1/search/tweets.json?q=".$searchstring."&result_type=mixed&rpp=100&count=".$notweets);      $twitter=json_encode($tweets);      foreach($tweets->statuses $tweet){ echo $tweet; } 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

node.js - Node - Passport Auth - Authed Post Route hangs on form submission -

Does Firefox offer AppleScript support to get URL of windows? -