202312 - Twitter API v2

This commit is contained in:
2023-12-27 15:40:10 +01:00
parent a980fbe8f9
commit 0bef7e1532
46 changed files with 2252 additions and 179 deletions
+7 -5
View File
@@ -21,6 +21,8 @@ require TOPISTO_PATH.'/ressources/vendor/autoload.php';
// ---
require_once APP_PATH.'/blockchain/inc/block.php';
require 'inc/twitter.php';
require '../generique/inc/twitter.php';
require '../config.php';
$midnight = strtotime('today midnight');
@@ -71,11 +73,11 @@ if (file_exists($image_file))
// ---
// --- Tweet
// ---
$tweet = "Lucky One on #bitcoin #blockchain 's".PHP_EOL;
$tweet .= "Someone put an empty block ...".PHP_EOL;
$tweet .= "And get the reward for it !".PHP_EOL;
$tweet .= "Block height : ".$the_block->height.PHP_EOL;
$tweet .= "[ See more on www.topisto.net ]";
$tweet = "Lucky One on #bitcoin #blockchain \\n";
$tweet .= "Someone put an empty block ...\\n";
$tweet .= "And get the reward for it !\\n";
$tweet .= "Block height : ".$the_block->height;
$tweet .= "\\n[ See more on www.topisto.net ]";
$success = twitter::tweet($tweet, $image_file);
}