3

我正在尝试将 Facebook 集成到我正在开发的网站中,我已经为该业务创建了一个 Facebook 页面和一个 Facebook 应用程序——我对 Facebook 使用的文档和术语感到非常困惑。

我正在使用 FBML 在我的网站的页脚添加一个推荐按钮,以便用户可以推荐该特定页面,但是当我单击它时,它会为该 URI 创建一个全新的 Facebook 页面,并且似乎忽略了所有 facebook 和打开图元标记信息。

仅供参考,这些是我正在使用的元标记:

<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"/>

这是我正在使用的 FBML:

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

这是我在标签之前添加到每个页面的 Facebook Javascript SDK 代码</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 页面,这可能吗?

提前谢谢了。

赞德

4

2 回答 2

6

这个问题与meta财产有关og:type。除了视频/音频等之外的任何内容article都将在开放的社交图谱上创建一个新的 Facebook 页面。

如果您设置og:typearticle或完全删除它,问题就会消失。

我希望这会有所帮助。

于 2010-12-14T02:14:38.130 回答
0

没有你放置“喜欢”按钮的地方,你可以在上面指定网址,所以这样只创建一个“页面”,例如:

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 -->

as you see here no mather what page your "like" button allways create the same page, even more you can specify your page aplication on it.

Remember even the "meta property" tags allways will create the same page if you specify the url and same content, if you left some part blank the facebook api will asume the current url and not will take any of the other parameters.Tha same apply to comments you can have the same comments box with the same comments on it if you specify the url.

于 2011-03-02T16:18:00.493 回答