如何删除Facebook评论警告? [英] How do I remove a facebook comment warning?

查看:166
本文介绍了如何删除Facebook评论警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的fb评论代码是:

<fb:comments    url="<?=$this_url?>" width="600"  xid="<?=$this_unique_xid?>" notify="true"  candelete="true" simple="1" numposts=1  url="http://www.veethi.com"></fb:comments>

现在,如果我想删除警告消息:

Now if i want to remove the warning message:

警告:此注释插件正在兼容模式下运行,但是 尚无帖子.考虑根据建议指定一个明确的"href" 在注释插件文档中以利用所有插件 功能

Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit ‘href’ as suggested in the comments plugin documentation to take advantage of all plugin features

我需要将"url"替换为"href",但是这样做会丢失我的旧注释, 是否有人遇到问题或解决方案,请回复我. 我需要一种解决方案来删除警告消息,并且以相同的方式处理所有旧评论. 预先感谢.

I need to replace "url" to "href", but by doing this i lose my old comments, Is anyone who facing the problem or solution pls, reply me. I need one solution that remove the warning message and the same way i have all my old comments. thankx in advance.

推荐答案

我编写了完整的教程,其中很少使用JS来解决此问题. 访问. 教程

I wrote a complete tutorial with a small use of JS to solve this issue. Visit the tutorial

我所做的是:

  • 在JS SDK中为XFBML标签设置解析
  • 使用日期参数向JS SDK添加函数调用,您可以将其手动设置一次,并在该日期之后发布的日期开始使用"href"版本,并且直到该日期之前发布的发布都将使用已迁移的日期版本.
  • 在fb:comments标记中添加另一个属性,即数据日期",并在其值中放置发布日期(动态代码).
  • 计算JS代码中的日期,并基于结果删除不需要的属性,最后,它使用
  • Set off the parse for XFBML tags in the JS SDK
  • Adding a function-call to the JS SDK with a date parameter that you manually set it once with a date that posts published after that date will start using the 'href' version, and posts published until that date will use the migrated version.
  • Adding another attribute to the fb:comments tag which is 'data-date' and in it's value you place your post date (dynamic code).
  • Calculating the dates in a JS code, and base on the result it's removing the not wanted attributes, and finally then it's render the XFBML tags using FB.XFBML.parse

这篇关于如何删除Facebook评论警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆