PublishToTwitter by Ferdi

Offers an option to publish a page to Twitter when the date for publishing is past/scheduled. Works only for Twitter API v1

PublishToTwitter

Processwire 3.x module to Tweet pages


In short this module offers an option to publish a page to Twitter when the date for publishing is past/scheduled.

After filling out the Twitter credentials, select your preferable template(s) which should have the option added to Tweet the pages using it. Additional select the field to use as publicationdate to check if the Tweet should be send now or later, a field which contains the page title.

Optional you can fill out the name of the website which will be added after the title (in case space is available).

Optional you can select the field where the page image(s) are placed (up to four can be tweeted, but mind the upload time).

v1.0.2 Removed use of Bit.ly

Includes instructions to set a cron (template or LazyCron), returns log in assets folder.

Uses (included) TwitterOAuth PHP library (https://github.com/abraham/twitteroauth) written by [abraham](https://github.com/abraham).

To use the module combined with a cron, the following code can be used in a template.

// when using LazyCron

if ($this->cronInterval) { $this->addHook("LazyCron::{$this->cronInterval}", null, 'RunCronPublishToTwitter'); } else { if (date('G') > 7 && date('G') < 23) { $this->addHook('LazyCron::every5Minutes', null, 'RunCronPublishToTwitter'); } else { $this->addHook('LazyCron::every6Hours', null, 'RunCronPublishToTwitter'); } }

// OR - for use in manual cron

$ptt = wire("modules")->get("PublishToTwitter"); $ptt->RunCronPublishToTwitter();

Check out the Processwire modules section for more details.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #519
    In the 519th issue of ProcessWire Weekly we'll check out a new third party module called RockForms, introduce the latest ProcessWire core updates, and more. Read on!
    Weekly.pw / 20 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer