• Resolved strictly-software

    (@strictly-software)


    Hi

    I was using Jetpack to post to Google+, Facebook, LinkedIn, Tumblr etc but now I have had to revert back to a basic use of my own plugin Strictly TweetBOT which posts Tweets to accounts linked to Facebook. So I am now missing out on LinkedIn, Google+ and Tumblr.

    I tried your plugin but I had the same problem as well as some others.

    The problem is that no tagging is done by my own plugin Strictly AutoTags.

    What I think is the problem with any of these auto posters is something to do with the way I have linked my two plugins Strictly AutoTags and Strictly TweetBot up.

    Strictly AutoTags fires only on save_post and calls a function called SaveAutoTags which does the tagging and then sets a hook up using the post ID.

    do_action('finished_doing_tagging',$object->ID);

    Then the TweetBOT is hooked into publish_post and if we are ignoring AutoTag it posts the tweets otherwise it calls a function called CheckAndPostTweets which basically checks if the AutoTags plugin is installed and if so it looks to see if the post has been tweeted already by checking for a meta value set ONLY once tweeting is done e.g

    // update meta so we know that we have tweeted this post
    add_post_meta($post_id, 'strictlytweetbot_posted_tweet', '1', true);

    If it hasn’t already Tweeted then it looks for the finished_doing_tagging event/hook and runs the PostTweets function e.g

    // hook post_tweets into our finished_doing_tagging EVENT add_action('finished_doing_tagging',array($this, 'PostTweets'),99,1);

    So the tweeting is only done AFTER the tagging is completed, which could take quite a while depending on the number of tags you have in your site.

    I had to take this approach as I started noticing tweets going out with post tags as #hashtags because the tagging hadn’t completed before the tweet job ran. Even though I set the priorities really low and high.

    I was told by someone from WP that you cannot rely on the priority to determine when a function or action/event is run.

    Therefore I am thinking your plugin and others like it (Jetpack) are doing your calls on the publish_post hook and this is causing no tagging to be done or tweets to go out even if your social media posts go out.

    I was wondering if you could think of a solution like somehow calling your plugins main function from my CheckAndPostTweets function in the TweetBot plugin once tagging has been completed. Then I know tags will exist, tweets will go out and then the social media posting to other sites can go out.

    Other suggestions by anyone would be welcome!

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author NextScripts

    (@nextscripts)

    I think you can just set a 3-5 minutes delay for autoposting (http://www.nextscripts.com/snap-features/scheduled-and-delayed-posting/) that will give your other plugins time to do their job.

    Thread Starter strictly-software

    (@strictly-software)

    Hi

    Yes probably you can but as soon as I turn on any kind of social media posting service whether it be this one or Jetpack the problem is that none of my posts get tagged which then means no Tweets go out even if social media posts go out.

    The details of how the hooks/events link the plugins together are described above.

    I think it has something to do with the on_publish event not being fired to create my tags and then tweets.

    I can turn on a social media outputter plugin and within minutes any posts imported in from feeds are not tagged or tweeted out. Whether or not your
    SNAP metas are filled to show they have posted out to LinkedIN etc.

    Thanks for the help though.

    Rob

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘No Tagging or Tweeting when using plugin’ is closed to new replies.