Skip to content

Instantly share code, notes, and snippets.

@mikestratton
Created April 20, 2015 06:27
Show Gist options
  • Save mikestratton/27504c08884c435e0341 to your computer and use it in GitHub Desktop.
Save mikestratton/27504c08884c435e0341 to your computer and use it in GitHub Desktop.
Connect & tweet to twitter using TwitterOAuth & Composer!
<?php
//Use the force, Luke: https://twitteroauth.com/
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
$twitterConnection = new TwitterOAuth(
'', //Consumer Key
'', //Consumer secret
'', //Access token
'' //Access token secret
);
$content = $twitterConnection->get('account/verify_credentials');
$twitterConnection->post('statuses/update', array('status' => "14"));
echo $twitterConnection->http_post;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment