Advertisement
Guest User

Siddharth / Twitter API / Oauth

a guest
Mar 30th, 2010
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. here is the complete code that u can check from ur server !!
  2.  
  3. This s not working.. and i don know why !!
  4.  
  5. i hav included all the credentilas..
  6.  
  7. Kindly check the code from ur server side and let me know what to do next !!
  8.  
  9. <?php
  10. include 'EpiCurl.php';
  11. include 'EpiOAuth.php';
  12. include 'EpiTwitter.php';
  13.  
  14.  
  15. $consumer_key = '';
  16. $consumer_secret = '';
  17.  
  18. $twitterObj = new EpiTwitter($consumer_key,$consumer_secret);
  19.  
  20. $oauth_token='';
  21. $oauth_token_secret='';
  22.  
  23. $twitterObj->setToken($oauth_token, $oauth_token_secret);
  24.  
  25. $twitterInfo= $twitterObj->get_accountVerify_credentials();
  26. $twitterInfo->response;
  27. echo "Your twitter username is {$twitterInfo->screen_name} and your
  28. profile picture is <img src=\"{$twitterInfo->profile_image_url}\">";
  29.  
  30. //$message Status update
  31.  
  32. $status = 'Testing API..';
  33. $update_status = $twitterObj->post_statusesUpdate(array('status' => $status));
  34.  
  35. $update_status->response;
  36. echo" Default tweet posted ( Testing API.. )";
  37. ?>
  38.  
  39. The included files are here for download
  40.  
  41. http://www.jaisenmathai.com/files/jaisenmathai_com_oauth_test.zip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement