Created
August 17, 2009 15:55
-
-
Save pvalencia/169204 to your computer and use it in GitHub Desktop.
example for twitter-cakephp-component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FooController extends AppController { | |
var $components = array('Twitter'); | |
function bar() { | |
/* authentication */ | |
$this->Twitter->username = 'foo'; | |
$this->Twitter->password = 'bar'; | |
$this->set('statuses', | |
$this->Twitter->statusesFriendsTimeline() /* <- Camelized method name */ | |
); | |
} | |
function rab() { | |
/* Without authentication */ | |
$this->set('statuses', | |
$this->Twitter->statusesPublicTimeline() | |
); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment