Why is my Facebook Like button creating a new Facebook page?

I am trying to integrate Facebook into the site that I am developing, I have created a Facebook page for business and a Facebook application too - I am very confused by the documents and terminology that Facebook uses.

I use FBML to add a Recommendation button to the footer of my site so that users can recommend this particular page, but when I click on it, it creates a completely new Facebook page for this URI and apparently ignores all Facebook and open graph meta tag information.

FYI, these are the meta tags that I use:

<meta property="og:title" content="My Page title"/>
<meta property="og:type" content="company"/>
<meta property="og:url" content="http://mysite.com/"/>
<meta property="og:image" content="http://mysiteimage.jpg"/>
<meta property="og:site_name" content="My Site Name"/>
<meta property="fb:admins" content="My_FB_Admin_ID"/>
<meta property="fb:page_id" content="My_FB_Page_ID" />
<meta property="fb:app_id" content="My_FB_App_ID" />
<meta property="og:description" content="Desctiption of page"/>

This is the FBML that I use:

<fb:like width="940" action="recommend" font="lucida grande"></fb:like>

SDK Javascript Facebook, </body> ( ):

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
        FB.init({appId: 'My_FB_App_ID', 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>

- , ? , ?

"/" Facebook , ?

.

+3
2

meta og:type. , article, , / .., Facebook .

og:type article , .

, .

+6

, "", URL- , "ex":

your created html location = http://mywebsite.com
some other stuff

    <!-- like button -->

     <fb:like href="http://mywebsite.com" layout="button_count" show_faces="false" width="200" font="lucida grande"></fb:like>

    <!-- end like button -->


your other created html location = http://mywebsite.com/help

some other stuff

    <!-- like button -->

     <fb:like href="http://mywebsite.com" layout="button_count" show_faces="false" width="200" font="lucida grande"></fb:like>

    <!-- end like button -->

, - , "" , .

, "meta property" , URL- , - , facebook api url - . , , URL.

0

Source: https://habr.com/ru/post/1759108/


All Articles