Guest User

Untitled

a guest
Mar 11th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. class FooController extends AppController {
  3. var $components = array('Twitter');
  4.  
  5. function bar() {
  6. /* authentication */
  7. $this->Twitter->username = 'foo';
  8. $this->Twitter->password = 'bar';
  9.  
  10. $this->set('statuses',
  11. $this->Twitter->statusesFriendsTimeline() /* <- Camelized method name */
  12. );
  13. }
  14.  
  15. function rab() {
  16. /* Without authentication */
  17. $this->set('statuses',
  18. $this->Twitter->statusesPublicTimeline()
  19. );
  20. }
  21. }
  22. ?>
Add Comment
Please, Sign In to add comment