Facebook Like button shows the “Confirm” link, but still cannot Like after confirming

痞子三分冷 提交于 2019-12-04 05:09:15

You haven't got the open graph namespace included in your html tag. That might cause weird behaviour. Try updating that to see if anything improves. An example of what it should look like:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="https://www.facebook.com/2008/fbml">

see documentation.

Load Facebook SDK This Way

<script type="text/javascript">
    window.fbAsyncInit = function() {
        FB.init({ appId: '111111111111111', status: true, cookie: true, xfbml: true });
    };

    (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
        document.getElementById('fb-root').appendChild(e);
    } ());

</script>

It is because of link redirection. Suppose you are making the button to like the following link:

http://example.com/abc.php?product=100

but when someone opens the above link by typing into the web browser, they get redirected to the following link (just giving an example)

http://example.com/abc/def

So make sure you put the correct link which is to be liked in the like button. In other words, if you will put http://example.com/abc/def in the link button, it won't ask for Confirmation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!