Skip to content

Instantly share code, notes, and snippets.

@nobuf
Created February 22, 2011 05:17
Show Gist options
  • Save nobuf/838262 to your computer and use it in GitHub Desktop.
Save nobuf/838262 to your computer and use it in GitHub Desktop.
Accessing Twitter API with Zend_Service_Twitter + Zend_Oauth_Token_Access
<?php
require_once 'Zend/Service/Twitter.php';
$me = 'zuzara';
$accessToken = new Zend_Oauth_Token_Access;
$accessToken->setToken('***')
->setTokenSecret('***'); // grab them at https://dev.twitter.com/apps/***/my_token
$twitter = new Zend_Service_Twitter(array(
'username' => $me,
'accessToken' => $accessToken,
));
$response = $twitter->user->friends();
var_dump($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment