Created
September 22, 2010 17:18
-
-
Save abraham/592098 to your computer and use it in GitHub Desktop.
Simple script to post a Tweet using XML and OAuth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Download the latest version of http://github.com/abraham/twitteroauth/downloads | |
// Move twitteroauth.php and OAuth.php into this directory. | |
// Register an application at http://dev.twitter.com/apps. | |
// Get a user access token as described in http://dev.twitter.com/pages/oauth_single_token. | |
require_once('twitteroauth.php'); | |
$connection = new TwitterOAuth('app consumer key', 'app consumer secret', 'my access token', 'my access token secret'); | |
$connection->format = 'xml'; | |
$status = $connection->post('statuses/update', array('status' => $message)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment