Twitter Friends

Users follow their interests on Twitter through both one-way and mutual following relationships.

Figure 1a. Instantiate Friends
$friends = eden('twitter')->friends('[TWITTER_KEY]', '[TWITTER_SECRET]', $_SESSION['access_token'], $_SESSION['access_secret']);
Figure 1b. Usage: Follow a User
$friends->follow('openovate');
Figure 1c. Usage: Get a List of Users Following You
$friends->getFollowers();
Figure 1d. Usage: Get a List of Users You are Following
$friends->getFollowing();
Figure 1e. Usage: Get Pending Approvals
$friends->getPendingFollowing();
Figure 1f. Usage: Get Pending Followers
$friends->getPendingFollowers();
Figure 1g. Usage: Get a Specific Relationship
$friends->getRelationship('openovate');
Figure 1h. Usage: Get a List of Relationships
$friends->getRelationships(1, 2, 3, 4);
Figure 1i. Usage: Unfollow a User
$friends->unfollow('openovate');
Figure 1j. Usage: Disable Retweets Notification From a User
$friends->update($id, false);
Figure 1k. Friends Methods

PHP WARNING from Front_Block_Methods->_getJavaDoc() in /home/openovate/public/eden.openovate.com/site/front/block/methods.php on line 163

Eden Says: Undefined offset: 1

Front_Block_Methods->_getJavaDoc() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(102)
Front_Block_Methods->_getNotes() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(70)
Front_Block_Methods->getVariables() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(68)
Eden_Block->render() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(37)
Eden_Block->__toString() /home/openovate/public/eden.openovate.com/site/front/page/documentation/social/twitter/friends.phtml(59)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eve.php(437)
Eve->template() /home/openovate/public/eden.openovate.com/site/front/page/documentation.php(48)
Front_Page_Documentation->render() /home/openovate/public/eden.openovate.com/site/front/page.php(39)
Front_Page->__toString() /home/openovate/public/eden.openovate.com/site/library/eve.php(78)
Eve->__toString() /home/openovate/public/eden.openovate.com/site/web/front.php(66)
require() /home/openovate/public/eden.openovate.com/site/web/index.php(7)

PHP WARNING from Front_Block_Methods->_getJavaDoc() in /home/openovate/public/eden.openovate.com/site/front/block/methods.php on line 163

Eden Says: Undefined offset: 1

Front_Block_Methods->_getJavaDoc() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(102)
Front_Block_Methods->_getNotes() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(70)
Front_Block_Methods->getVariables() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(68)
Eden_Block->render() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(37)
Eden_Block->__toString() /home/openovate/public/eden.openovate.com/site/front/page/documentation/social/twitter/friends.phtml(59)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eve.php(437)
Eve->template() /home/openovate/public/eden.openovate.com/site/front/page/documentation.php(48)
Front_Page_Documentation->render() /home/openovate/public/eden.openovate.com/site/front/page.php(39)
Front_Page->__toString() /home/openovate/public/eden.openovate.com/site/library/eve.php(78)
Eve->__toString() /home/openovate/public/eden.openovate.com/site/web/front.php(66)
require() /home/openovate/public/eden.openovate.com/site/web/index.php(7)

PHP WARNING from Front_Block_Methods->_getJavaDoc() in /home/openovate/public/eden.openovate.com/site/front/block/methods.php on line 163

Eden Says: Undefined offset: 1

Front_Block_Methods->_getJavaDoc() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(102)
Front_Block_Methods->_getNotes() /home/openovate/public/eden.openovate.com/site/front/block/methods.php(70)
Front_Block_Methods->getVariables() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(68)
Eden_Block->render() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(37)
Eden_Block->__toString() /home/openovate/public/eden.openovate.com/site/front/page/documentation/social/twitter/friends.phtml(59)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eve.php(437)
Eve->template() /home/openovate/public/eden.openovate.com/site/front/page/documentation.php(48)
Front_Page_Documentation->render() /home/openovate/public/eden.openovate.com/site/front/page.php(39)
Front_Page->__toString() /home/openovate/public/eden.openovate.com/site/library/eve.php(78)
Eve->__toString() /home/openovate/public/eden.openovate.com/site/web/front.php(66)
require() /home/openovate/public/eden.openovate.com/site/web/index.php(7)
Method Arguments Returns Description
$friends->getFollowing($id = NULL);
  1. string|int
array Returns an array of numeric IDs for every user the specified user is following.
$friends->getFollowers($id = NULL);
  1. string|int|null
array Returns an array of numeric IDs for every user following the specified user.
$friends->follow($id, $notify = false);
  1. string|int
  2. - user id or screen name
  3. bool
array Allows the authenticating users to follow the user specified in the ID parameter..
$friends->getPendingFollowing(); none array Returns an array of numeric IDs for every protected user for whom the authenticating user has a pending follow request.
$friends->getPendingFollowers(); none array Returns an array of numeric IDs for every user who has a pending request to follow the authenticating user.
$friends->getRelationship($id, $target);
  1. int|string
  2. - user ID or screen name
  3. int|string
  4. - user ID or screen name
array Returns detailed information about the relationship between two users.
$friends->getRelationships($id = NULL);
  1. int[,int]|string[,string]|array|null
  2. - list of user IDs or screen names
array Returns the relationship of the authenticating user to the comma separated list
$friends->unfollow($id, $entities = false);
  1. string|int
  2. - user ID or screen name
  3. bool
array Allows the authenticating users to unfollow the user specified in the ID parameter.
$friends->update($id, $device = false, $retweets = false);
  1. string|int
  2. - user ID or screen name
  3. boolean
  4. boolean
array Allows one to enable or disable retweets and device notifications from the specified user.
$friends->setCursor($cursor = null);
  1. string|int|null
  2. string|int|null

PHP WARNING from trim() in /home/openovate/public/eden.openovate.com/site/front/block/methods.phtml on line 53

Eden Says: trim() expects parameter 1 to be string, array given

trim() /home/openovate/public/eden.openovate.com/site/front/block/methods.phtml(53)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(68)
Eden_Block->render() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(37)
Eden_Block->__toString() /home/openovate/public/eden.openovate.com/site/front/page/documentation/social/twitter/friends.phtml(59)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eve.php(437)
Eve->template() /home/openovate/public/eden.openovate.com/site/front/page/documentation.php(48)
Front_Page_Documentation->render() /home/openovate/public/eden.openovate.com/site/front/page.php(39)
Front_Page->__toString() /home/openovate/public/eden.openovate.com/site/library/eve.php(78)
Eve->__toString() /home/openovate/public/eden.openovate.com/site/web/front.php(66)
require() /home/openovate/public/eden.openovate.com/site/web/index.php(7)
void
get list of friends/following with details
$friends->setCursor($cursor = null);
  1. string|int|null

PHP WARNING from trim() in /home/openovate/public/eden.openovate.com/site/front/block/methods.phtml on line 53

Eden Says: trim() expects parameter 1 to be string, array given

trim() /home/openovate/public/eden.openovate.com/site/front/block/methods.phtml(53)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(68)
Eden_Block->render() /home/openovate/public/eden.openovate.com/site/library/eden/block.php(37)
Eden_Block->__toString() /home/openovate/public/eden.openovate.com/site/front/page/documentation/social/twitter/friends.phtml(59)
include() /home/openovate/public/eden.openovate.com/site/library/eden/template.php(98)
Eden_Template->parsePhp() /home/openovate/public/eden.openovate.com/site/library/eve.php(437)
Eve->template() /home/openovate/public/eden.openovate.com/site/front/page/documentation.php(48)
Front_Page_Documentation->render() /home/openovate/public/eden.openovate.com/site/front/page.php(39)
Front_Page->__toString() /home/openovate/public/eden.openovate.com/site/library/eve.php(78)
Eve->__toString() /home/openovate/public/eden.openovate.com/site/web/front.php(66)
require() /home/openovate/public/eden.openovate.com/site/web/index.php(7)
void
get list of followers with details
$friends->setCursor($cursor = null); none Eden_Twitter_Friends Set cursor
$friends->skipStatus(); none Eden_Twitter_Friends Set skip status

© 2012 Openovate Labs. All rights reserved.