Support » Plugin: AddToAny Share Buttons » Custom Icon: Facebook like or recommend button does not use custom image

  • Resolved pkwrites

    (@pkwrites)


    Facebook like or recommend button is not using the custom icon. Can you please let me know how to make the Facebook like or recommend button to use the custom icon?

    The icon name for Facebook recommend is facebook_recommend.svg. I also tested with facebook_like.svg icon name.

    The custom icon is working for Facebook, twitter and Google plus.

    • This topic was modified 6 years, 10 months ago by pkwrites.
    • This topic was modified 6 years, 10 months ago by pkwrites.
Viewing 1 replies (of 1 total)
  • Plugin Author micropat

    (@micropat)

    The regular Facebook button in AddToAny can use a custom icon, but the Facebook Like button cannot use a custom icon because it’s served directly by Facebook with a very narrow set of options.

    If you a want a mock version of the Like button, you can add a custom service to your theme’s functions.php or similar. For example:

    function addtoany_custom_services( $services ) {
        $services['facebook_like_custom'] = array(
            'name'        => 'Facebook Like Custom',
            'icon_url'    => 'https://www.example.com/custom-like-button.svg',
            'icon_width'  => 50,
            'icon_height' => 20,
            'href'        => 'https://www.addtoany.com/add_to/facebook?linkurl=A2A_LINKURL',
        );
        return $services;
    }
    add_filter( 'A2A_SHARE_SAVE_services', 'addtoany_custom_services', 10, 1 );

    You can then enable the new custom service in AddToAny settings.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Icon: Facebook like or recommend button does not use custom image’ is closed to new replies.