WordPress.org

Support

Support » Plugins and Hacks » Social Subscribers Counter » [Plugin: Social Subscribers Counter] Twitter counter needs to be updated

[Plugin: Social Subscribers Counter] Twitter counter needs to be updated

Viewing 8 replies - 1 through 8 (of 8 total)
  • pacovitiello, thank you for update!
    I replaced the code you mentioned, but it didn’t work for me yet.
    this plugin has 4 developers and unfortunately no one answer any question!

    Have you tried to empty the cache of your browser?

    Yes, I did, but as you mentioned too, plugin has several bugs (FeedBurner and links doesn’t open in new page (I fixed it but developers didn’t update the plugin)), I selected and installed a very nice plugin today, here.

    By the way, thanks for replay.
    Appreciated

    The trick worked for me, but unfortunately I can’t help you because I am not very good with php. Let’s wait, maybe the developers will release an update soon.

    Thanks a lot this trick worked for me… @reza you must Deactivate then Delete it then Re-Upload it again with the modification of twitter api link then it will work…

    If the updated code doesn’t work right away, you might not have to deactivate the plugin. The twitter number is cached by default for an hour. Even when it fails, it looks to me like it’s caching an empty string.

    I updated my code, and it’s working fine. Occasionally though, when the server can’t get through to twitter for whatever reason, it caches the empty string for an hour. We don’t want that, nor do we want the server hammering twitter. So I set mine to cache for just 1 minute in the event that a non-numeric response is received from twitter (or, not at all):

    if(is_numeric($followers)){
          set_transient('social_subscribers_counter_twitter', $followers, 3600);
    }else{
          set_transient('social_subscribers_counter_twitter', $followers, 60);
    }

    ollyb, could you please let me know what line I need to place your code snippet on? Do I need to overwrite old code with this updated code?

    Thanks!

    It just needs to go in place of the existing “set_transient” line. So take that line out, and put the 5 lines from the snippet above in its place.

    Hope that helps!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Social Subscribers Counter] Twitter counter needs to be updated’ is closed to new replies.
Skip to toolbar