PHP code example of masuipeo / tweet
1. Go to this page and download the library: Download masuipeo/tweet library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
masuipeo / tweet example snippets
tweet.php
eet\Tweet;
$keys = [
"consumer_key" => "xxxxxxxxxx",
"consumer_secret" => "xxxxxxxxxx",
"access_token" => "xxxxxxxxxx",
"access_token_secret" => "xxxxxxxxxx"
];
$twitter = new Tweet($keys);
if ($twitter->tweet("Hello, Twitter.")) {
echo "Success";
} else {
echo "Failure";
}
sh
$ php tweet.php