WP to Twitter
[resolved] Double posting tweets after upgrade (4 posts)

  1. capour
    Posted 3 years ago #

    I've been using WP to twitter for quite some time and it has been working perfectly, however I recently decided to upgrade to version 2.4.7 and since then this plugin does _occasional_ double posting to twitter (it occurs about 80% of the time). And with double posting I mean that whenever I do 1 post in my blog I get 2 tweets for it.

    I do change the post_excerpt (through the wp api) after it has been posted since I want a custom text for the tweet, so the default twitter filter for duplicate posts doesn't help me there.

    I only have "New posts" selected in the plugin menu.

    Any ideas why it fires 2 twitter updates instead of just one?


  2. capour
    Posted 3 years ago #

    I maybe should add that I use wp_insert_post() for posting.

  3. Joe Dolson
    Plugin Author

    Posted 3 years ago #

    I'm not entirely clear what your process for posting actually is, but I gather it's some kind of custom coding? Is that right?

    I'm very confused about the timing of your editing the excerpt and how that would impact the duplicate tweet filters.

    Also, please upgrade to the most recent version. I would prefer only to support the most current version of the plugin, to avoid having to find bugs I've already fixed.

  4. capour
    Posted 3 years ago #

    I've tried upgrading to the latest version of the plugin (also using latest wordpress version) but the issue persists.

    We have a custom CMS so we only use wordpress as a gateway to be able to post to twitter.

    This is an extract on how our code looks like:

    // Insert new post
    $post_id = wp_insert_post( $my_post );
    // Update post (Set excerpt to empty)
    $my_post_update = array();
    $my_post_update['ID'] = $post_id;
    $my_post_update['post_excerpt'] = '';
    wp_update_post( $my_post_update );

    As you can see both insert and update are done right after eachother, I've tried putting in a sleep(20) between the insert and update but that doesn't stop the extra tweet being made on the wp_update_post call.

    Could it be some flag in plugin that don't get update correctly? Or do I need to clean sweep my settings for the plugin?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP to Twitter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic