Description
Despite Mastodon implying that you would use this plugin for engaging on Mastodon (when you have enabled it for that, see below), the plugin is useful when installed on a plain WordPress.
When you use a Mastodon app, you’ll enter your own blog URL to connect and log in to your blog in the following screens.
You’ll then see just the posts on your blog which can already be useful in a multi-author environment (e.g. private blogs). You can also use that Mastodon app to create simple posts with a message + attachment(s) which can be better suited for your usecase than using the Gutenberg-capable WordPress mobile app.
When used in combination with the ActivityPub (for being followed via Mastodon) and Friends (for following people on Mastodon or via RSS) plugins, the Enable Mastodon Apps plugin will show you your feed of people you follow and you can follow and unfollow people from within the app.
Be aware that an app will have a post format associated (see the settings page). The plugin will check for the existance of the Friends plugin to find a resonable default (status with Friends plugin, standard otherwise). When you create a post with your Mastodon app, the post format that you selected for the app will be used.
The plugin has been tested with quite a number of Mastodon clients, among them are:
- Elk (Web)
- Pinafore (Web)
- Tusky (Android)
- Ivory (macOS and iOS)
- Mona (macOS)
- IceCubes (macOS)
- Mammoth (macOS and iOS)
- Phanpy (Web)
- Mona (macOS and iOS)
Many more, see the Third-party apps section on joinmastodon.org/apps. Each app might have its quirks, please report an issue when you have troubles. There is also a chance that the API has not been implemented yet (see below.)
Mastodon API Implementation
The plugin implements the Mastodon API as documented on joinmastodon.org: The OAuth API for logging in (you will see your WordPress login screen when logging in to your Mastodon app, it also works with 2FA plugins) and the REST API for accessing your data.
Here is a list of endpoints and their implementation status:
- [x]
GET /oauth/authorize
Authorize a user - [x]
POST /oauth/token
Obtain a token - [x]
POST /oauth/revoke
Revoke a token - [ ]
GET /api/v1/emails/confirmation
Resend confirmation email - [ ]
GET /api/v1/accounts
Register an account - [x]
POST /api/v1/apps
Create an application - [ ]
GET /api/v1/apps/verify_credentials
Verify your app works - [x]
GET /api/v1/instance
View server information (v1!) - [x]
GET /api/nodeinfo/2.0.json
(used by Pixelfed) - [ ]
GET /api/v1/announcements
(implemented as empty) View all announcements - [ ]
POST /api/v1/announcements/:id/dismiss
Dismiss an announcement - [ ]
POST /api/v1/announcements/:id/reactions/:name
Reactions to an announcement - [ ]
GET /api/v1/filters
(implemented as empty) - [ ]
GET /api/v1/lists
(implemented as empty) - [ ]
GET /api/v1/custom_emojis
(implemented as empty) View all custom emojis - [x]
GET /api/v1/accounts/verify_credentials
Verify account credentials - [x]
PATCH /api/v1/accounts/update_credentials
Update account credentials - [x]
GET /api/v1/accounts/:id
Get account - [x]
GET /api/v1/accounts/:id/statuses
Get account’s statuses - [x]
GET /api/v1/accounts/:id/followers
Get account’s followers - [ ]
GET /api/v1/accounts/:id/following
Get account’s following - [ ]
GET /api/v1/accounts/:id/featured_tags
Get account’s featured tags - [ ]
GET /api/v1/accounts/:id/lists
Get lists containing this account - [x]
GET /api/v1/accounts/:id/follow
Follow account - [x]
GET /api/v1/accounts/:id/unfollow
Unfollow account - [x]
GET /api/v1/accounts/relationships
Check relationships to other accounts - [x]
POST /api/v2/media
Upload media as an attachment (async) - [x]
GET /api/v1/media/:id
Get media attachment - [x]
POST /api/v1/statuses
Post a new status - [x]
GET /api/v1/statuses/:id/context
Get parent and child statuses in context - [x]
POST /api/v1/statuses/:id/favourite
Favourite a status - [x]
POST /api/v1/statuses/:id/unfavourite
Unfavourite a status - [x]
POST /api/v1/statuses/:id/reblog
Boost a status - [x]
POST /api/v1/statuses/:id/unreblog
Undo the boost a status - [x]
GET /api/v1/statuses/:id
View a single status - [x]
GET /api/v1/notifications/
(partial, just mentions) Get all notifications - [x]
GET /api/v1/notifications/:id
Get a single notification - [x]
POST /api/v1/notifications/clear
Dismiss all notification - [x]
POST /api/v1/notifications/:id/dismiss
Dismiss a single notification - [x]
GET /api/v1/timelines/home
View home timeline - [x]
GET /api/v1/timelines/public
View public timeline - [ ]
GET /api/v1/markers
(implemented as empty) Get saved timeline positions - [ ]
POST /api/v1/markers
Save your position in a timeline - [x]
GET /api/v2/search
(partial, accounts (local and exact match for remote) and statuses in the local db) Perform a search
Unmentioned endpoints are not implemented. Contributions welcome!
Endpoints around interacting with non-local users require the ActivityPub plugin. Following users requires the Friends plugin. Lists-related endpoints require the Friends Roles plugin.
Screenshots
Reviews
Contributors & Developers
“Enable Mastodon Apps” is open source software. The following people have contributed to this plugin.
Contributors“Enable Mastodon Apps” has been translated into 15 locales. Thank you to the translators for their contributions.
Translate “Enable Mastodon Apps” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.9.9
0.9.8
- Fix replying on received comments via the ActivityPub plugin (#176)
0.9.7
- Fixed bug where the create post type was ignored (#175)
- Automatically convert post content to blocks, can be disabled (#174)
0.9.6
- Adds steaming_api to instance_v1, props @mediaformat (#171)
- PATCH routes: support field_attributes, props @mattwiebe (#167)
- Make token storage taxonomies private, props @mattwiebe (#165)
- Updated tester.html from upstream
- Introduce a Never Used label to the registered apps screen.
0.9.5
- Add a details link to the apps page (#163)
- Show all comments by others as notifications (#164)
- Update NodeInfo endpoint by @pfefferle (#162)
- Multisite: ensure that user_ids only work for users of this site by @mattwiebe (#158)
- Increase phpcs rules and fix them by @mattwiebe (#160, #155)
- Add
api/v1/accounts/update_credentials
route by @mattwiebe (#157)
0.9.4
- Added a dedicated page per app in the settings. There you can set which post types should be shown in the app. Also which post type should be created for new posts. (#154)
- Fixed authenticating Jetpack so that you can connect WordPress.com to this plugin (#152)
0.9.3
- Bring back the upgrade code.
0.9.2
- Quick fix to disable the upgrade script to avoid errors.
0.9.1
- Allow an empty search type, to search in all categories (#150) props @pfefferle
- Don’t reactivate the Link Manager (#148)
- Avoid errors when dividing strings (#147) props @mattwiebe
- Don’t include spam comments in the feed (#149)
- Ensure no spaces in URLs (#144)
- Fix some typos on the Welcome Screen (#143)
0.9.0
- Complete Rewrite, started at the Cloudfest Hackathon! Props @pfefferle, @drivingralle, @kittmedia, @obenland
- Thus: all ActivityPub related tasks are handled by the ActivityPub plugin, all following-related tasks by the Friends plugin. Please make sure you have the latest version of those plugins if you want to use such features
- Reorganized settings, added a way to tester the local api (#138, #140)
- Allow Editing a submitted status (#137)
- Improves to Attachments (#132, #136)
- Fix OAuth rewrite path (#130)