DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:autotweet2

AutoTweet 2 Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown

plugin Post the information of changes to Twitter.

Last updated on
2018-08-29
Provides
Action
Repository
Source

Similar to autotweet

Tagged with api, notifications, twitter

:!: このページは日本語でご覧頂けます(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 Autotweet (1) Plugin is no longer be supported, so I newly made it.

:!: When I made this plugin, 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 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 create an app through Twitter Apps. Follow the instruction below.

1. Make an app

Go to https://apps.twitter.com , and log in with the Twitter account you want to activate the auto-tweet.
If you have never made apps through Twitter Apps, you'll see this screen, then choose Create New App.

Maybe you are seeing this screen.

Fill in the form. You don't have to enter Callback URLs.1)

Read the Twitter Developer Agreement, then check the box and push Create your Twitter application.

Are you seeing this screen? Good!

If you see this screen...

You'll have to register your phone number to your twitter account. Follow the instructions by Twitter.2)

2. Get and enter your keys

Go to Keys and Access Tokens.

…and you'll see this screen. Then scroll down.

Find Your Access Token, then push Create my access token.

Now you can see your Consumer Key, Consumer Secret, Access Token, and Access Token Secret.
You'll enter them to the config of this plugin. Use Configuration Manager, scroll to Autotweet2, and fill in the blanks (also, you can change other settings of the plugin).

:!: Consumer Secret and Access Token Secret shouldn't be seen by others. Please be sure that your conf directory is secured (see 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 Configuration Manager.

OptionDescriptionValue TypeDefault Value
apiKey, apiSecret, accessToken, and accessTokenSecretSee the instruction above.string3)
subjectOfTweetSubjects of the auto-tweet (choose from when edited, reverted, created, deleted, and edited [minor changes])multiple choice from edit, revert, create, delete, and minoredit,revert,create,delete
templateTemplate 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
###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###] ###PAGETITLE###: ###SUMMARY### ###PAGEURL###
blacklistPages that will not be subjects of auto-tweet (separate by vertical bars “|”)
e.g.:“playground:playground|start|wiki:syntax“
string4)
debugIf 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.)boolean0

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”

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 GitHub page, or if you wanna contact me for other things, you can contact me by:

Discussion

1)
Values in the image is just an example.
2)
You can delete your phone number from your Twitter account if you are not creating and editing your Twitter apps.
3) , 4)
empty
plugin/autotweet2.txt · Last modified: 2018-08-29 17:34 by hokkaidoperson