From 812a45030639247bc6883b1f17b81df9f5d24197 Mon Sep 17 00:00:00 2001 From: sbsatwork <97030650+sbsatwork@users.noreply.github.com> Date: Fri, 16 Dec 2022 16:33:33 +0100 Subject: [PATCH] Simple example for posting a status update Created a new example script to show how to simply post a plain text status update to a Mastodon account. --- examples/status_bot.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/status_bot.php diff --git a/examples/status_bot.php b/examples/status_bot.php new file mode 100644 index 0000000..c1610ef --- /dev/null +++ b/examples/status_bot.php @@ -0,0 +1,22 @@ + $statusText, +'privacy' => $privacy, +'language' => $language +); + +$mastodon = new MastodonAPI($token, $baseURL); +$result = $mastodon->postStatus($statusData); + +// Activate the next line if you want to print the result of the query +//var_dump($result); +?>