Support » Plugin: Simple Facebook Connect » [Plugin: Simple Facebook Connect] Select which image to be post o Facebook

  • oscarnogueira

    (@oscarnogueira)



    Hi,

    first congratulations for this excellent plugin.

    Now the real deal. I made a few changes to the plugin (sfc-base.php) so I can choose only images with a given attribute to be post to facebook (Publisher).

    Is this a feature scheduled for the next updates or can I send you the code and you see if you can add it?

    Regards,

    http://wordpress.org/extend/plugins/simple-facebook-connect/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    SFC uses the Featured Image for that functionality already. Just set the featured image on a post and it’ll use that one.

    oscarnogueira

    (@oscarnogueira)

    Yep! But unfortunately the theme I’m using has some custom post types that doesn’t support the featured image.

    Some post types, like gallery, can’t have an fetured image, otherwise doesn’t work properly. This hacks helps this kind of themes.

    Regards,

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Instead of “hacking” it, just use the sfc_base_meta filter. That’s what it’s there for. You can change the metadata before it’s output in any way you like.

    oscarnogueira

    (@oscarnogueira)

    Errr… Is there a manual for the sfc_base_meta?

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    No, because it’s a pretty straightforward filter to use. The meta entries come to the filter in the form of an indexed array. Just use the filter to edit them.

    add_filter('sfc_base_meta','example_func');
    function example_func($fbmeta) {
      unset($fbmeta['og:image']);
      $fbmeta['og:image'][] = 'http://example.com/image.jpg';
      return $fbmeta;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Select which image to be post o Facebook’ is closed to new replies.