No Tagging or Tweeting when using plugin
-
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
The topic ‘No Tagging or Tweeting when using plugin’ is closed to new replies.