| <?php | |
| $the_tweet = 'hello'; | |
| // TWITTER API ================== | |
| $consumerKey = 'qu...xF'; | |
| $consumerSecret = 'it...hG'; | |
| $oAuthToken = '24...ub'; | |
| $oAuthSecret = 'oy...d2'; | |
| include "OAuth.php"; | |
| include "twitteroauth.php"; | |
| $tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret); | |
| if (isset($the_tweet)) { | |
| $tweetmsg = $the_tweet; | |
| $tweet->post('statuses/update',array('status' => $tweetmsg)); | |
| echo "Your message has been sent to Twitter."; | |
| } else { | |
| echo "Your message has not been sent to Twitter."; | |
| } | |
| // END TWITTER API ================== | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment