This functionality is ideal if you want to automatically post on one or more dedicated Twitter accounts news coming from your portal.
Tweets are not editable but are automatically created based on articles' title, keywords and URL. They are stored in the database and are published on Twitter when their related articles are published (this is usually done manually by a topic administrator or automatically by the scheduler).
Please note that tweets, once posted, cannot be edited / deleted by PhPeace, but only via twitter.com, using the associated Twitter account.
Twitter API keys
For Twitter integration to work, a pair of API keys must be generated on http://dev.twitter.com/apps
On Twitter.com, this means to register your app (i.e. your PhPeace installation).
Once registration is successful, you wil be given two API keys which are used to identify your portal installation.
The Twitter accounts that you will use in PhPeace must authorize your PhPeace installation to post for them, and that's why you need a pair of API keys to identify it.
API keys are bound to a domain and you should use the domain of your PhPeace admin installation.
When you register your app (that is your PhPeace installation) on Twitter, give it a sensible description so that your PhPeace users understand that it refers to the PhPeace installation they're using.
The registration form will also ask for some additional information.
As "Application website", specify the URL of your administrative interface.
The "Callback URL" specify the URL of your administrative interface. Callback URL will be passed by PhPeace on each post, however it's important to set a placeholder in this field for it to be considered a web application.
For "Default Access type", you want "Read & Write" as you want to enable Twitter accounts to create posts.
Once registration is successful, you will be shown a detailed page on twitter.com including your API keys information.
The two keys that you are interested in are called "Consumer key" and "Consumer secret".
They must be set by sysadmin in the system configuration file.
By default, no API keys are configured and as a consequence all Twitter-related functionalities are disabled.
Once you've set your Twitter API keys, you can associate an unlimited number of Twitter accounts.
Each Twitter account must first be created and activated on Twitter (remember to validate your associated email address).
You can then bind it to a PhPeace Twitter account, which define also the parameters that trigger posting status updates.
Please note the difference between Twitter accounts (created on twitter.com) and PhPeace Twitter accounts (created in your PhPeace installation), which are associated to one Twitter account and define how the automated posting is triggered.
PhPeace Twitter accounts can be created at global level, posting articles from the whole portal of from specific topic groups, or at each topic level, where they're independently managed by topic's administrators.
You can find a link to editing / creating PhPeace Twitter accounts in the main page of the topics module (for topics' module administrator) or under the Modules' secion in each topic control panel.
If you don't see this link (named "Twitter"), it's very likely that your Twitter API keys have not been configured. Please generate them as explained above and ask your system administrator to put them in your system configuration file.
Binding PhPeace Twitter accounts
The operation of binding a PhPeace Twitter account to a Twitter account uses the open authentication standard Oauth, so that no real username / password is stored and the Twitter user can manage the binding from its own Twitter profile (http://twitter.com/settings/connections)
You will be asked to execute this binding operation when you create a PhPeace Twitter account and you can repeat it again at any time by clicking on the "Bind account" button.
You will be redirected to twitter.com and asked to enter your Twitter credentials in order to allow your PhPeace installation to post for you. You will then be redirected back to the admin interface, where if the operation has been successful you will be able to see the Twitter account image and name.
Twitter account parameters
Each PhPeace Twitter account must be named for internal reference
You can associate a PhPeace Twitter account to the whole portal, to a group of topics or to a specific topic. Depending on this association, the account will post tweets based on articles from the portal / topic group / topic.
Only if notified among the latest news of the portal
This box controls whether tweets are created only when a new article is flagged as new, or for all articles.
You should always leave this box checked, otherwise you will post a tweet for each article update, which can happen for a number of reasons (such as simple amendments or historical update) that usually do not require a Twitter status update.
You can optionally restrict posting on Twitter to articles which have been tagged with a specific keyword only.
A keyword ID must be used, not the keyword itself. You can find out keyword IDs in the ontology module.
This option can be useful in combination with an internal keyword, showing admin users an option to check if they want to create a tweet based on the article they're editing.
Use article keywords
This option lets you choose whether the tweet should contain the non-internal keywords associated to the article, marked with the usual #.
You can activate / deactivate a PhPeace Twitter account, keeping all its settings and account bindings but stopping its posting activity.
Please note that tweets are limited to 140 characters.
The article's headline will be shortened if its' too long in order to fit in the tweet together with the article's URL. Article keywords are added only if they can fit in the 140 characters limtations.
This information has been last verified with PhPeace version 188.8.131.52