We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to schedule a post on Twitter ?
My code :
if ($new_status == 'publish') { $parameters = [ 'text' => $tweet, ]; // Publie le tweet $status = $connection->post('tweets', $parameters); }else if ($new_status == 'future') { $timeToPublished = ""; $year2Pub = $_POST['aa']; $month2Pub = $_POST['mm']; $day2Pub = $_POST['jj']; $hour2Pub = $_POST['hh']; $minute2Pub = $_POST['mn']; $sec2Pub = $_POST['ss']; $timeZone = 'Europe/Paris'; // +2 hours $dateSrc = '' . $year2Pub . '-' . $month2Pub . '-' . $day2Pub . ' ' . $hour2Pub . ':' . $minute2Pub . ':' . $sec2Pub . ''; $dateTime = new DateTime($dateSrc); $dateTime->setTimeZone(new DateTimeZone($timeZone)); $timeToPublished = $dateTime->format('Y-m-d\TH:i:sO'); $parameters = [ 'text' => $tweet, 'scheduled' => $timeToPublished ]; // Programmer le tweet $status = $connection->post('tweets', $parameters); }
This code didn't work for me.
Thank you for your response.
The text was updated successfully, but these errors were encountered:
Twitter API doesn't support it https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets
Sorry, something went wrong.
No branches or pull requests
Is it possible to schedule a post on Twitter ?
My code :
This code didn't work for me.
Thank you for your response.
The text was updated successfully, but these errors were encountered: