Home > Software design >  Facebook like button on website only works when visitor is logged in on FB
Facebook like button on website only works when visitor is logged in on FB

Time:10-12

I created a Facebook Like button on our website using the facebook developers site: https://developers.facebook.com/docs/plugins/like-button.

This works and in several browsers, visitors get to see a like button.

However, when a visitor is not logged into Facebook, the like button remains invisible. Does anyone know a solution for this? Actually the button should always be visible. When the visitor is not logged in, he should get the chance to login when he presses the like button.

CodePudding user response:

Try this, maybe it would be helpful

To fix this you need to change your display settings. Go to your page and click on “Edit Page” then “Edit Settings”. Make sure that both Country Restrictions and Age Restrictions are both set to “Page is visible to Everyone” and “Page is shown to Everyone”.

From article: https://www.moorewebexposure.com/internet/facebook-like-button-not-showing/

CodePudding user response:

You're probably in a EU country, I am guessing?

They placed a big hint on top of https://developers.facebook.com/docs/plugins/like-button that explains what the issue is:

Changes to Social Plugins in the European Region
You may start to see some impact to Social Plugins due to an updated cookies consent prompt that will be shown to people using Facebook products in the European Region. We will no longer support the 'Like' and 'Comment' Social Plugins for European Region users, unless they are both 1) Logged into their Facebook account, and 2) have provided consent to the “App and Website Cookies” control. If both of these requirements are met, the user will be able to see and interact with plugins such as the 'Like' or 'Comment' button. If either of the requirements above are not met, the user will not be able to see the plugins.

  • Related