Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Manage and automate social publishing on Plone sites

Project Description


Provides a viewlet (and under-the-hood machinery) for managers that allows to publish contents to social networks (only twitter ATM). Social publication can be automated by enabling it per-content.

To enable the viewlet just mark the content-type you want with collective.socialpublisher.interfaces.IPublishable. You can do it from ZMI or trough ZMCL:

<class class="Products.ATContentTypes.content.event.ATEvent">
    <implements interface="collectinve.socialpublisher.interfaces.IPublishable" />

NOTE: this is already done by the package in this alpha stage.

Twitter accounts management is done by collective.twitter.accounts.

You can provide a publisher by registeriing an utility providing collective.socialpublisher.interfaces.ISocialPublisherUtility. See collective.socialpublisher.utility for details.

To enable auto-publishing you have to enable it per-content (waiting for global configuration) and you have to create a cron the calls @@social-auto-publish. You can do it using Products.cron4plone or trough buildout like this:

zope-conf-additional =
      method /plonesite/@@social-auto-publish
      period 1000
      user admin
      password admin

See also

Tested on

Plone 4.1 + 4.2rc1

Publish manager

Let’s create an Event

>>> from import setRoles
>>> from import TEST_USER_ID
>>> portal = layer['portal']
>>> setRoles(portal, TEST_USER_ID, ['Manager'])
>>> evid = portal.invokeFactory('Event', 'event')
>>> event = portal[evid]

and check that is enabled for publishing

>>> from collective.socialpublisher.interfaces import IPublishable
>>> IPublishable.providedBy(event)

get the manager

>>> from collective.socialpublisher.interfaces import IPublishStorageManager
>>> manager = IPublishStorageManager(event, None)
>>> manager is None

storage must be a PersistentDict

>>> from persistent.dict import PersistentDict
>>> isinstance(,PersistentDict)

and accounts must be an empty dict and text an empty string.

>>> manager.get_accounts()
>>> manager.get_text()

We can save an account for a given publisher

>>> publisher = 'twitter'
>>> account_id = 'simahawk'
>>> manager.set_account(publisher,account_id)
>>> manager.get_account(publisher)
>>> manager.get_accounts()
{'twitter': 'simahawk'}

let’s add another publisher/account.

>>> publisher = 'facebook'
>>> account_id = 'simahawkfb'
>>> manager.set_account(publisher,account_id)
>>> manager.get_account(publisher)
>>> manager.get_accounts()
{'twitter': 'simahawk', 'facebook': 'simahawkfb'}

We can also save the text to be published

>>> manager.set_text('foo bar')
>>> manager.get_text()
'foo bar'

Then we can hard reset the settings like this:

>>> manager._reset_storage()
>>> manager.get_accounts()
>>> manager.get_text()


  • tests + docs
  • add support for linkedin and facebook
  • make query for auto-publish content dynamic/configurable



  • [add] test buildout.cfg
  • [imp] improved tests
  • [imp] improved docs
  • [add] global config using p.a.registry + controlpanel
  • [imp] you can now turn off auto-publish globally


  • [fix] old twitter import
  • [imp] ‘update’ button for saving settings without publishing
  • [imp] ‘one-shot-text’ a flag for changing the text only for the current publishing without overwriting the stored one
  • [imp] if cron4plone is present display any available cron schedule
  • [imp] improved styles a bit


  • Initial release


This product was developed by Domsense.

Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (40.5 kB) Copy SHA256 Checksum SHA256 Source Jun 1, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting