====== AutoTweet 2 Plugin ====== ---- plugin ---- description: Post the information of changes to Twitter. author : HokkaidoPerson email : dosankomali@yahoo.co.jp type : Action lastupdate : 2018-10-30 compatible : Greebo, 2018-04-22 similar : autotweet tags : twitter, notifications, api downloadurl: https://github.com/hokkaidoperson/DokuWiki-AutoTweet2-Plugin/zipball/master bugtracker : https://github.com/hokkaidoperson/DokuWiki-AutoTweet2-Plugin/issues sourcerepo : https://github.com/hokkaidoperson/DokuWiki-AutoTweet2-Plugin donationurl: ---- :!: [[ja:plugin:autotweet2|このページは日本語でご覧頂けます(This page is also available in Japanese)]]\\ :!: I’m not a native English speaker, so this page may contain some mistakes in English sentences. ===== Summary ===== When pages are changed, this plugin will post tweets through Twitter API. It seems that [[plugin:autotweet|Autotweet (1) Plugin]] is no longer be supported, so I newly made it. :!: When I made this plugin, [[https://syncer.jp/Web/API/Twitter/REST_API/|this page (in Japanese)]] was really helpful for me. ===== Installation ===== :!: **JUST adding this plugin to your wiki won't activate the auto-tweet.** You should read this section through the end. ==== Add this plugin to your wiki ==== Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. ==== Additional Operations ==== **You'll have to sign up to Twitter Developer Platform to use Twitter API.** Sorry but I'm not motivated to introduce you about signing up to the platform and creating Twitter API. Google about them. Be careful, __it takes several days to be accepted by Twitter__. === After you get the Twitter API === You'll enter your **Consumer Key**, **Consumer Secret**, **Access Token**, and **Access Token Secret** to the config of this plugin. Use [[plugin:config|Configuration Manager]], scroll to **Autotweet2**, and fill in the blanks (also, you can change other settings of the plugin). {{https://raw.githubusercontent.com/hokkaidoperson/DokuWiki-Descriptions-Image/master/autotweet2/desc10.png}} :!: The picture is the screen of https://apps.twitter.com, which became unable to create Twitter API.\\ :!: Consumer Secret and Access Token Secret shouldn't be seen by others. **Please be sure that your conf directory is secured** (see [[:security#web_access_security]]). OK, the plugin is ready! ===== Examples/Usage ===== When pages in your wiki are changed, the Twitter app will notice with URLs of the pages. ===== Configuration and Settings ===== You can change the following setting by using the [[plugin:config|Configuration Manager]]. ^Option^Description^Value Type^Default Value^ |''apiKey'', ''apiSecret'', ''accessToken'', and ''accessTokenSecret''|See the instruction above.|string|((empty))| |''subjectOfTweet''|Subjects of the auto-tweet (choose from when edited, reverted, created, deleted, and edited [minor changes])|multiple choice from ''edit'', ''revert'', ''create'', ''delete'', and ''minor''|''edit,revert,create,delete''| |''template''|Template of the message\\ REPLACEMENT:\\ ###WIKITITLE###→The title of this wiki\\ ###PAGETITLE###→The title of the edited page\\ ###TYPE###→The type of editing ("edited", "reverted", "created", "deleted", or "edited (minor change)" will be shown)\\ ###SUMMARY###→The summary of editing\\ ###EDITOR###→Who changed the wiki (Follows the config "[[config:showuseras]]")\\ ###PAGEURL###→The URL leading to the edited page (if there is not ###PAGEURL###, the URL will be automatically added to the last of the template)|textarea|''[###WIKITITLE### - ###TYPE### by ###EDITOR###] ###PAGETITLE###: ###SUMMARY### ###PAGEURL###''| |''guestIP''|What to replace ###EDITOR### of the template with if the editor was not logging in|pull-down choice from ''0'' (Don\'t show the IP address, replace with the null text), ''alt'' (Replace with the alternative text ([[plugin:hidingip|Hidingip plugin]] required.)), or ''show'' (Show the IP address)|''0''| |''blacklist''|Pages that will not be subjects of auto-tweet (separate by vertical bars "|")\\ e.g.:"playground:playground|start|wiki:syntax"|string|((empty))| |''debug''|If the editor is a manager, show the debug information (a body (JSON) and a response header) when the plugin is run (Use this option to investigate causes when the plugin doesn't work well.)|boolean|''0''| ===== Development ===== === Change Log === * **2018-07-02** * Initial release * **2018-08-29** * From this version, a space will be inserted after an at-mark ''@'' not to violent the Twitter rule that prohibits "automated @ tweets" * Added an option "debug" * **2018-10-30** * Added a option to tweet who changes the wiki === Known Bugs and Issues === Currently none === ToDo/Wish List === I'll do my best if you think this leaves something to be desired ===== Contact Me ===== If you find some problems in this plugin, you can make issue topics on the [[https://github.com/hokkaidoperson/DokuWiki-AutoTweet2-Plugin|GitHub page]], or if you wanna contact me for other things, you can contact me by: * * [[https://twitter.com/YukkuriDosanko|My Twitter]] (Japanese account but English acceptable) ===== Discussion =====