Support » Plugins » Hacks » "WP Facebook Open Graph Protocol" Modification

  • Resolved BloggerDave

    (@bloggerdave)


    I am sure many users of this plugin “WP Facebook Open Graph protocol” have found a small (but frustrating) problem with it. If you have set a default image in “Default Image URL to use”, then even if you do not select “Force Fallback Image as Default,” the default image will be shown as the first choice when you share your page on facebook. Most users would prefer that images from the post should be used instead.

    I checked the code today and believe I have found the problem. Since I don’t know where to post a bug for a plugin, I thought I would just post it here:

    Look for the following code:
    // Add the fallback image to the images array (which is empty if it’s being forced)
    if ( isset( $options[‘wpfbogp_fallback_img‘] ) && $options[‘wpfbogp_fallback_img’] != ”) {

    Note the first condition in the if statement checks for the fallback image instead of checking whether the force flag is used. Just change it to the following code:

    // Add the fallback image to the images array (which is empty if it’s being forced)
    // if ( isset( $options[‘wpfbogp_fallback_img’] ) && $options[‘wpfbogp_fallback_img’] != ”) {
    if ( ($options[‘wpfbogp_force_fallback‘] == 1) && $options[‘wpfbogp_fallback_img’] != ”) {

    Now it will check for ‘wpfbogp_force_fallback’, so it will work as described in the plugin description.

    You are welcome. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘"WP Facebook Open Graph Protocol" Modification’ is closed to new replies.