PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Search Methods

  • tweets() returns a list of tweets matching the criteria specified in $query. By default, 15 will be returned, but this value may be changed using the count option.

    Example 878. Searching for tweets

    <?php
    $twitter  
    = new Zend_Service_Twitter($options);
    $response $twitter->search->tweets('#zendframework');

    The tweets() method accepts an optional second argument, an array of optional parameters to modify the query.

    • since_id narrows the returned results to just those statuses after the specified identifier (up to 24 hours old).

    • max_id narrows the returned results to just those statuses earlier than the specified identifier.

    • count specifies the number of statuses to return, up to 200.

    • include_entities controls whether or not entities, which includes URLs, mentioned users, and hashtags, will be returned.

    • lang indicates which two-letter language code to restrict results to.

    • locale indicates which two-letter language code is being used in the query.

    • geocode can be used to indicate the geographical radius in which tweets should originate; the string should be in the form "latitude,longitude,radius", with "radius" being a unit followed by one of "mi" or "km".

    • result_type indicates what type of results to retrieve, and should be one of "mixed," "recent," or "popular."

    • until can be used to specify a the latest date for which to return tweets.

Zend Framework