Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2.  
  3. //chaves
  4. $key = 'ausJc1fibKRZTnDRfIm9oJLmd';
  5. $key_secret= 'RmUmMgORdG61sB4aneAaeq9DkCDVF8NP2kjfgWXhduGeYxtjh2';
  6. $token= '953601434326650880-8VSHcSaC5h0JhebzSCdm3vOt2o0FDe0';
  7. $token_secret='VS8fpqlujus77ATlYsDOgvSp2lkzO3BCmjOLiRnLW1NPD';
  8.  
  9. //requisição da biblioteca
  10. require 'C:\xampp\htdocs\tw\autoload.php';
  11. use Abraham\TwitterOAuth\TwitterOAuth;
  12.  
  13.  
  14. //conexao
  15. $conn = new TwitterOAuth($key, $key_secret, $token, $token_secret);
  16. $valida = $conn->get("account/verify_credentials");
  17.  
  18. //pega status
  19. $status = $conn->get("statuses/home_timeline", ["count" => 25, "exclude_replies" => true ]);
  20.  
  21. //mostra status
  22. print_r($status)
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement