-
exists()checks if the authenticating user is blocking a target user and can optionally return the blocked user's object if a block does exists.Example 863. Checking if block exists
<?php
$twitter = new Zend_Service_Twitter(array(
'username' => 'johndoe',
'accessToken' => $token
));
// returns true or false
$response = $twitter->block->exists('blockeduser');
// returns the blocked user's info if the user is blocked
$response2 = $twitter->block->exists('blockeduser', true);The
favorites()method accepts a second optional parameter.returnResultspecifies whether or not return the user object instead of justTRUEorFALSE.
-
create()blocks the user specified in theidparameter as the authenticating user and destroys a friendship to the blocked user if one exists. Returns the blocked user in the requested format when successful.Example 864. Blocking a user
<?php
$twitter = new Zend_Service_Twitter(array(
'username' => 'johndoe',
'accessToken' => $token
));
$response = $twitter->block->create('usertoblock);
-
destroy()un-blocks the user specified in theidparameter for the authenticating user. Returns the un-blocked user in the requested format when successful.Example 865. Removing a block
<?php
$twitter = new Zend_Service_Twitter(array(
'username' => 'johndoe',
'accessToken' => $token
));
$response = $twitter->block->destroy('blockeduser');
-
blocking()returns an array of user objects that the authenticating user is blocking.Example 866. Who are you blocking
<?php
$twitter = new Zend_Service_Twitter(array(
'username' => 'johndoe',
'accessToken' => $token
));
// return the full user list from the first page
$response = $twitter->block->blocking();
// return an array of numeric user IDs from the second page
$response2 = $twitter->block->blocking(2, true);The
favorites()method accepts two optional parameters.pagespecifies which page ou want to return. A single page contains 20 IDs.returnUserIdsspecifies whether to return an array of numeric user IDs the authenticating user is blocking instead of an array of user objects.




