Refract
The setup after connecting: the accounts that get a version of each post, grouped by network, and when to send posts.

The setup after connecting: the accounts that get a version of each post, grouped by network, and when to send posts.

You already write on your blog. With Refract, you don’t have to write the same thing again for every network.

When you publish a post, Refract gets it as a note. It writes a version for each account you chose, in your workspace’s voice, and crops the post’s images for each network. Every version waits for your approval. You preview and approve the versions in the post editor, or in Refract. Nothing goes out until you approve it.

Bring readers back from social

Each version links back to your post, so your blog gets visits and your links get shared. Once a version is posted, the post editor shows the link to it and the clicks so far, for example “12 clicks from Instagram”.

From WordPress to Refract

  • Send posts when they’re published, or only when you choose, from the editor.
  • Choose the post types, the categories and the accounts.
  • See each version in the post sidebar: its text, its image in the network’s shape and its status.
  • Approve each version, or approve all and add them to the queue. Or open one in Refract to edit it.
  • Works with the block editor and the Classic Editor plugin.

From Refract to WordPress

Your site becomes an account in Refract. From Refract you can send blog posts to it as drafts, or, if you allow it, publish or schedule them. Refract can create posts, update the posts it created and move them to the trash. It can’t change anything else on your site: not other posts, settings, users, plugins, themes or files. It’s off until you turn it on, and then sends drafts only unless you choose otherwise. You choose which user the posts show as their author (Refract never signs in as that user) and the default category. You can turn this off at any time.

Link previews

The plugin can add social preview tags (Open Graph and X card), so your links show a title and an image on every network. If another plugin already adds these tags, the plugin leaves them to it.

Networks

Networks you can connect: TikTok, YouTube, X, Pinterest, Bluesky, Mastodon, Telegram, Discord, Tumblr, Slack, Pixelfed and DEV.

Coming soon: Instagram, Facebook and Threads.

What you need

  • A Refract account. You can start with a free trial at refract.social, no card needed.
  • AI credits for the versions. Each version costs 1 AI credit, and your plan includes credits each month. With your own AI key in Refract, versions cost no credits. You can also send the same post, with the link, to every account for free.
  • WordPress 6.8 or later and PHP 8.1 or later. Multisite works: each site connects separately.

Source code

The JavaScript in build/ is made with @wordpress/scripts. Its unminified source is in the plugin’s src/ folder, and the build setup is in package.json and webpack.config.js. To build it yourself, run npm install and then npm run build in the plugin’s folder. The source code is also on GitHub: anpsthemes-wp-themes/refract-for-wordpress.

The network icons in src/common/marks.js come from Simple Icons (CC0 1.0). The Refract and LinkedIn marks are drawn for this plugin.

External services

This plugin connects your site to Refract (https://refract.social), a service that writes social posts from your blog posts and schedules them. You need a Refract account to use it. Nothing is sent to Refract until you click “Connect to Refract”.

What’s sent, and when:

  • When you connect: your site’s name and address, the versions of WordPress and of the plugin, the site’s language and time zone, and a signing secret the plugin makes, so Refract can sign what it sends to your site.
  • When Refract asks what your site looks like (when you connect, and when someone writes a post for your site in Refract; Refract keeps the answer for 10 minutes): your site’s name and address, the versions of WordPress and of the plugin, the site’s language and time zone, its categories and up to 200 tags, the default category, and the display name of the person Refract publishes as.
  • When a post is sent to Refract, after you publish it or click “Send to Refract”: the post’s title, excerpt, text, link and images (with their alt text), and the accounts chosen for it. Updates to the post are sent the same way, unless you turn that off.
  • When the post sidebar loads its versions: the post’s ID in Refract. When you approve versions, which ones you approved.
  • When you disconnect or delete the plugin: a request to end the connection.
  • When the post sidebar or the Classic Editor box shows a version’s image: your browser loads the image from Refract’s media host (https://media.refract.social).
  • When Refract publishes a post on your site: your site downloads the post’s images from Refract’s media host (https://media.refract.social) and adds them to your media library.

Refract also sends requests to your site: it downloads the post’s images from their links, sends updates about your versions, and, if you allow it, creates posts (drafts unless you choose otherwise), updates the posts it created or moves them to the trash.

Refract’s terms of service: https://refract.social/legal/terms
Refract’s privacy policy: https://refract.social/legal/privacy