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 #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 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

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH