Autoshare for Twitter


Autoshare for Twitter automatically tweets your posts as soon as they’re published. Once you hit the Publish button, the plugin sends your post’s title, featured image, and link to Twitter, along with a custom message.

Unlike a myriad of other social media, multitool solutions, Autoshare for Twitter is built solely for Twitter. It focuses on doing one thing and does it well, with the code and interface craftsmanship we apply to every project.

With Autoshare for Twitter, developers can further customize nearly everything about the tweets, including the image, author, and link, using an extensive set of hooks built into the code. Among its other features, the WordPress plugin:

  • Works in both the classic and new block editors.
  • Becomes part of the pre-publish checklist step that’s part of the new block editor.
  • Posts a high-quality featured image with your tweet.
  • Counts characters to keep you under the tweet limit.
  • Adds a link to the tweet in the block editor sidebar.

Disclaimer: TWITTER, TWEET, RETWEET and the Twitter logo are trademarks of Twitter, Inc. or its affiliates.

Plugin Compatibility


When using with 10up’s Distributor plugin, posts that are distributed will not be autoshared if they are already tweeted from the origin site. Autoshare for Twitter tracks posts that have been tweeted in post meta to avoid “double tweeting”. To avoid this behavior, use the dt_blacklisted_meta filter to exclude the ‘autoshare_for_twitter_status’ meta value from being distributed :

add_filter( 'dt_blacklisted_meta', function( $blacklisted_metas ) {
    $blacklisted_metas[] = 'autoshare_for_twitter_status';
    return $blacklisted_metas;
} )


Note: Posts and pages are supported by default. Developers can use the autoshare_for_twitter_default_post_types filter to change the default supported post types

Custom post types can now be opted into autoshare features like so:

function opt_my_cpt_into_autoshare() {
    add_post_type_support( 'my-cpt', 'autoshare-for-twitter' );
add_action( 'init', 'opt_my_cpt_into_autoshare' );

In addition, adding support while registering custom post types also works. Post types are automatically set to autoshare. Future versions of this plugin could allow this to be set manually.

While the autoshare feature can be opted into for post types using the above filter, by default the editor still has to manually enable autoshare during the post prepublish flow. The autoshare_for_twitter_enabled_default filter allows autoshare to be enabled by default for all posts of a given post type. Editors can still manually uncheck the option during the publishing flow.


function enable_autoshare_by_default_for_core_post_type( $enabled, $post_type ) {
    if ( 'post' === $post_type ) {
        return true;

    return $enabled;
add_filter( 'autoshare_for_twitter_enabled_default', 'enable_autoshare_by_default_for_core_post_type', 10, 2 );

Additional technical details can be found in our GitHub repository.


  • Create post screen with Autoshare for Twitter options.
  • Published post screen with Autoshare for Twitter options.
  • Autoshare For Twitter sidebar panel.
  • Autoshare for Twitter Settings, found under Settings > Autoshare for Twitter.


  1. Install the plugin via the plugin installer, either by searching for it or uploading a .ZIP file.
  2. Activate the plugin.
  3. Save Twitter connection settings, found under Settings > Autoshare for Twitter.


Does this plugin work with Gutenberg?

Yes, yes it does! For more details on this, see #44.

Does the plugin work with Twitter API V2?

Yes, the plugin is compatible with Twitter API v2.

I’m encountering the error message “401: Unauthorized.” What could be the possible reason for this error?

There are a few potential reasons for this error:
1. Incorrect Twitter API credentials: Please ensure that you have entered the correct Twitter API credentials.
2. Deprecated access levels: If you are still using the old Twitter access levels (Standard (v1.1), Essential (v2), Elevated (v2), etc…), you must migrate to the new access levels (Free, Basic, Pro, etc.). Please make sure to migrate to the new access levels to ensure uninterrupted functionality. Here’s how you can do it:

1. Go to the following URL:
2. Look for the "Downgrade" button.
3. Click on it to migrate to the free access level.

I’m encountering the error message “429: Too Many Requests.” What could be the possible reason for this error?

If you’re seeing the error message “429: Too Many Requests” it indicates that you have exceeded the usage limits of Twitter’s Free API access. With the Free API, you are allowed 1,500 Tweets per month and 50 requests within a 24-hour period. Since you have surpassed the daily limit, we kindly advise waiting for 24 hours before attempting to tweet again.

To avoid encountering this error in the future and to have higher usage limits, we recommend considering a subscription to either the Basic or Pro access level. These access levels provide increased quotas and additional benefits to accommodate your needs. For more information on Twitter API access levels, you can visit this link:


1 di Jugn dal 2023 1 reply
This plugin works incredibly well, including new Twiiter v2 API. Support its really quick, professional, polite, kind and patient. It has being a joy to meet this developer. Thank you!!
26 di Avrîl dal 2020
Did a full review of this plugin on my YouTube channel. There are several steps to getting it securely linked to your Twitter account, but there are step-by-step instructions on how to do that successfully. Loved it and highly recommend it.
Read all 4 reviews

Contributors & Developers

“Autoshare for Twitter” is open source software. The following people have contributed to this plugin.



2.1.0 – 2023-08-XX

2.1.0 – 2023-07-06

2.0.0 – 2023-05-16

Autoshare for Twitter 2.0.0 utilizes Twitter’s v2 API. If you have not already done so, please migrate your app to Twitter’s v2 API to continue using Autoshare for Twitter. Learn more about migrating here.

1.3.0 – 2023-01-20

1.2.1 – 2022-12-07

Note that this release bumps the WordPress minimum from 5.3 to 5.7 and PHP minimum from 7.2 to 7.4.

1.2.0 – 2022-09-28

Note that this release bumps the WordPress minimum from 4.9 to 5.3.

1.1.2 – 2022-06-24

1.1.1 – 2022-04-13

  • Fixed: If Autoshare is enabled by default, it does not consider the post-level “Tweet this post” checkbox and always tweets (props @iamdharmesh, @Sidsector9).

1.1.0 – 2022-04-13

1.0.6 – 2020-09-19

  • Note: this was a hotfix release to fix an issue with deploys to

1.0.5 – 2021-09-15

1.0.4 – 2020-07-02

  • Note: this was a hotfix release to fix an issue with included libraries.

1.0.3 – 2020-07-01

  • Added: autoshare_for_twitter_disable_on_transition_post_status filter to disable tweeting based on post status change (props @rickalee)
  • Changed: Bumped WordPress version support to 5.4.2 (props @dinhtungdu, @jeffpaul)
  • Changed: Build, test, and release processes (props @johnwatkins0, @dinhtungdu)
  • **Fixed:*# Enable autoshare meta always set to 0 when saving draft (props @dinhtungdu, @rickalee)

1.0.2 – 2020-03-12

1.0.1 – 2020-02-03

  • Added: autoshare_for_twitter_enabled_default filter to allow autoshare to be enabled by default for a post type (props @johnwatkins0, @rickalee, @dinhtungdu)
  • Changed: bypass character texturization when the post title is tweeted (props @johnwatkins0, @rickalee)
  • Removed: second instance of the autoshare_for_twitter_tweet filter (props @johnwatkins0)

1.0.0 – 2019-12-17

  • Added: Initial public release! 🎉
  • Added: Plugin renamed to “Autoshare for Twitter”
  • Added: Support Post and Page post types by default, provide Custom Post Type (props @johnwatkins0)
  • Added: Gutenberg support (props @johnwatkins0)
  • Added: REST API endpoint to replace AJAX callback (props @johnwatkins0)
  • Added: Build process, PHPCS linting, unit tests, and Travis CI (props @johnwatkins0, @adamsilverstein)
  • Added: Plugin banner and icon images (props Stephanie Campbell)
  • Changed: Refactor v0.1.0 significantly (props @adamsilverstein, @johnwatkins0, @jeffpaul)
  • Security: XSS prevention – switch from .innerHTML to text (props @adamsilverstein)

0.1.0 – 2018-05-11