SHARE
TWEET
Twitter API PHP
a guest
Oct 21st, 2011
2,040
Never
- <?
- $consumerKey = ' ';
- $consumerSecret = ' ';
- $oAuthToken = ' ';
- $oAuthSecret = ' ';
- include "OAuth.php";
- include "twitteroauth.php";
- $tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);
- if (isset($_GET['msg'])) {
- $tweetmsg = $_GET['msg'];
- $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.";
- }
- ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

