【问题标题】:Facebook like button source informationFacebook点赞按钮来源信息
【发布时间】:2013-10-01 23:32:26
【问题描述】:

我在我的应用程序中加入了 facebook like 按钮

假设你喜欢这个页面 https://developers.facebook.com/blog/post/397/

然后,当您访问您的 Facebook 墙时,您会看到“fb_account_name”赞了developers.facebook.com 上的一篇文章。

我希望我喜欢以这种方式工作。我的点赞按钮无法以这种方式工作,它不会显示我的网站名称以及类似“fb_account_name”这样的句子喜欢

上的文章

我从这里得到了我的代码https://developers.facebook.com/docs/reference/plugins/like/

我该怎么办?

【问题讨论】:

    标签: facebook facebook-like


    【解决方案1】:

    The open graph protocol

    在你的页面head标签中,添加:

    <meta property="og:site_name" content="Site Name" />
    <meta property="og:title" content="Page Title" />
    <meta property="og:type" content="article" /> // site type (og type)
    <meta property="og:url" content="http://example.test/" />
    <meta property="og:image" content="http://example.test/og_image.png" /> // can be .jpg, too
    <meta property="og:description" content="A sentence describes your site purpose" />
    

    以上内容将帮助 Facebook 在点击“赞”按钮时了解“如何在他们的时间轴上发布用户操作”

    <div class="fb-like" data-href="http://example.test/myPage.html" data-width="450" data-show-faces="true" data-send="true"></div>
    

    记得包含 Facebook JS

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多