WordPress Rest API – Draft, then Publish


and thanks in advance for the help,

I’ve been using the WordPress REST API, in combination with an automated tweeting tool, to post onto my site and have the post automatically shared to Twitter. The only complaint I have is that the link previews on Twitter do not include my post’s featured image.

After a bit of digging, I realized that this was because WP could not register the image before the plugin posts to twitter, and therefore has no image to show in the link preview. I cannot delay the tweets, so my only choice is to store the post, and then tweet it out ~30 seconds later. I’ve played around with the ‘date’ field but even setting it to the future doesn’t work.

Is there any way I can first set the post status to draft, then set it to publish 30 seconds later?

, , Wild Whitney 3 years 2020-06-03T17:11:58-05:00 0 Answers 96 views 0

Leave an answer