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 #523
    In the 523rd issue of ProcessWire Weekly we'll check out what's new in the core this week, share some new module related news, and more. Read on!
    Weekly.pw / 18 May 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

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits