mirror of
https://github.com/liftedpixel/lslscripts.git
synced 2026-08-14 00:58:07 +00:00
Create Post to Twitter.php
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// require codebird
|
||||
require_once('codebird.php');
|
||||
|
||||
\Codebird\Codebird::setConsumerKey("xxxxx", "xxxxx");
|
||||
$cb = \Codebird\Codebird::getInstance();
|
||||
$cb->setToken("xxxxx", "xxxxx");
|
||||
|
||||
$message = $_GET['message'];
|
||||
$password = $_GET['password'];
|
||||
|
||||
$thePassword = 'xxxxx';
|
||||
|
||||
if ( $password != $thePassword )
|
||||
{
|
||||
die('Wrong password');
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'status' => $message
|
||||
);
|
||||
$reply = $cb->statuses_update($params);
|
||||
|
||||
echo "Posted to Twitter: " . $message;
|
||||
?>
|
||||
Reference in New Issue
Block a user