BJ Facebook Popular Posts
Like / Recommend? (6 posts)

  1. snurk
    Posted 3 years ago #

    Hello dear all ppl,

    I wonder, does this plugin count number of likes, number of recommendations, or both?

    I currently only have a like button on my site, but how do the "recommend" shares come in to play? :)

    Best regards,


  2. Bjørn Johansen
    Plugin Author

    Posted 3 years ago #

    Hi SNURK

    To stay compatible with the previous versions which used the "old" way of getting the numbers from Facebook, the plugin use the total_count number, which is shares, likes and comments combined. In the old Facebook API version, FB reported "shares" which really was the same number as todays total_count.

    Which numebers beeing used should be clearified, and I will do so in an upcoming version which also lets you choose which numbers you want to use.

  3. Oliver Krautscheid (oliversk)
    Posted 3 years ago #

    Hi, can you give us more information on how it makes the call to get the shares?

    I am a little confused and think something is blocking the call so it cant fetch the shares

    Definitely not working out of the box for me, so I'll need more information. Going through your code I saw that you use wp_remote_get

    wp_remote_get = do I need to remove any PHP functions from disable_functions in php.ini?

    Will report back

  4. Bjørn Johansen
    Plugin Author

    Posted 3 years ago #

    It's basicly fetching like this:

    (Replace wordpress.org with whatever URL you want to check).

    wp_remove_get finds and use you have installed, cURL/file_get_contents/whatever.

    IMHO you shouldn't have anything in disable_functions …

  5. Oliver Krautscheid (oliversk)
    Posted 3 years ago #

    For security reasons it is better you rewrite your call and use CURL only and avoid file_get_contents

    You should NEVER have an empty disable_functions or you are opening your server to all sorts of nasty PHP attacks

    fopen is not considered very secure and many system admins disallow it

    This will probably apply only too few users like myself, but I would vote for CURL

  6. Bjørn Johansen
    Plugin Author

    Posted 3 years ago #

    Thank you for your feedback. Using file_get_contents() there was a mistake, I should of course have used wp_remote_get() instead. wp_remote_get() is part of the WordPress HTTP API and use whatever transport is available on the system. I think it prefers cURL.

    An update is on the stairs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BJ Facebook Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic