【问题标题】:FACEBOOK COMMENT SOCIAL PLUGIN + VARIABLE脸书评论社交插件+变量
【发布时间】:2012-04-30 14:18:14
【问题描述】:

我正在尝试做类似的事情:

我有带有可变链接的 php 页面,例如:some.php?id=1

我想在这个页面集成facebook评论插件,但是每个ID的内容应该是不同的。

如何在这个插件中提及变量链接

<div class="fb-comments" data-href='http://comesite.com/some.php' data-num-posts='5' data-width='500'></div>

我试过这个:

$id=$_GET['id'];

<div class="fb-comments" data-href='http://comesite.com/some.php?id='".$id."' data-num-posts='5' data-width='500'></div>

不工作..当我评论 some.php?id=1 也出现在 some.php?id=2 中

有什么建议吗??提前致谢!

【问题讨论】:

    标签: facebook variables plugins comments social


    【解决方案1】:

    试试这个

    <div class="fb-comments" data-href='http://comesite.com/some.php?id=<?php echo "$_GET[id]";?>' data-num-posts='5' data-width='500'></div>
    

    【讨论】:

      猜你喜欢
      • 2015-03-04
      • 1970-01-01
      • 2011-11-07
      • 1970-01-01
      • 2012-10-23
      • 2011-12-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多