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

User Methods

  • friends()r eturns up to 100 of the authenticating user's friends who have most recently updated, each with current status inline.

    Example 873. Retrieving user friends

    <?php
    $twitter 
    = new Zend_Service_Twitter(array(
        
    'username' => 'johndoe',
        
    'accessToken' => $token
    ));
    $response   $twitter->user->friends();

    The friends() method accepts an array of optional parameters to modify the query.

    • id specifies the ID or screen name of the user for whom to return a list of friends.

    • since narrows the returned results to just those statuses created after the specified date/time (up to 24 hours old).

    • page specifies which page you want to return.

  • followers() returns the authenticating user's followers, each with current status inline.

    Example 874. Retrieving user followers

    <?php
    $twitter 
    = new Zend_Service_Twitter(array(
        
    'username' => 'johndoe',
        
    'accessToken' => $token
    ));
    $response   $twitter->user->followers();

    The followers() method accepts an array of optional parameters to modify the query.

    • id specifies the ID or screen name of the user for whom to return a list of followers.

    • page specifies which page you want to return.

  • show() returns extended information of a given user, specified by ID or screen name as per the required id parameter below.

    Example 875. Showing user informations

    <?php
    $twitter 
    = new Zend_Service_Twitter(array(
        
    'username' => 'johndoe',
        
    'accessToken' => $token
    ));
    $response   $twitter->user->show('myfriend');

Zend Framework