简体   繁体   English

Facebook喜欢按钮发布错误的URL到墙上

[英]Facebook like button posting wrong url to wall

I have a facebook app displayed on my page via an Iframe . 我通过Iframe在页面上显示了一个Facebook应用。 I have included the following code on my page to generate the like and comment block . 我在页面上添加了以下代码以生成like和comment块。

<div class="my_page_footer">
 <script src="https://connect.facebook.net/en_US/all.js"></script>
  <div class="my_page_likes">
    <fb:like href="<?=$canvas_url;?>" show_faces="true" width="570" font="verdana"></fb:like>
  </div>
  <div id="fb-root"></div>
  <div class="my_page_comments">
    <fb:comments href="<?=$canvas_url;?>" num_posts="5" width="570"></fb:comments>
  </div>
</div>

Where the canvas url is the iframe src to my app. 画布网址是我的应用的iframe src。 However when anybody clicks on Like the iframe src url is posted on their wall instead of the name of the app or the link to the app 但是,当任何人单击“喜欢iframe src”时,URL就会张贴在他们的墙上,而不是应用程序的名称或应用程序的链接

Any thoughts ? 有什么想法吗 ?

  • Neil 尼尔

Facebook figures out what to display for a URL using Open Graph headers. Facebook使用Open Graph标头找出要显示的URL内容。 For example: 例如:

<meta property="og:title" content="..." />
<meta property="og:url" content="..." />
<meta property="og:image" content=""..." />

You can use the OG debugger tool to figure out if your headers are setup correctly. 您可以使用OG调试器工具来确定标题是否正确设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM