Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once($_SERVER['DOCUMENT_ROOT'].'/twitteroauth.php');
- $consumerKey = 'insert consumerkey';
- $consumerSecret ='insert consumersecret';
- $oAuthToken ='insert accesstoken';
- $oAuthSecret ='insert accesstoken secret ';
- // create a new instance
- $tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);
- //send a tweet
- if($tweet->post('statuses/update', array('status' => 'Api practice with @regularlambda ')))
- echo 'Tweet';
- else
- echo 'Fail++';
- ?>
Add Comment
Please, Sign In to add comment