大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索
打印 上一主题 下一主题

Facebook的like赞button出问题The href URL must be absolute-教学

[复制链接]
跳转到指定楼层
1#
发表于 2013-1-17 22:10:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Facebook的link赞button出问题The href URL must be absolute-教学
以下的代码会出问题会有错误
https://www.facebook.com/plugins/error/api?code=100&message=The+href+URL+must+be+absolute&hash=AQDbO7C8s6S5G1Mi
  1. <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="www.freeinfo.com.my/viewthread.php?tid=$tid" send="true" width="450" show_faces="true" font=""></fb:like>
复制代码
之后,换成如下,换了新的script,同时在域名加上http,之后刷新 The href URL must be absolute 就消失了。
appId=138726916195540"是我的,请使用您的
  1. <script>(function(d, s, id) {
  2.   var js, fjs = d.getElementsByTagName(s)[0];
  3.   if (d.getElementById(id)) return;
  4.   js = d.createElement(s); js.id = id;
  5.   js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=138726916195540";
  6.   fjs.parentNode.insertBefore(js, fjs);
  7. }(document, 'script', 'facebook-jssdk'));</script>
  8. <fb:like href="http://freeinfo.com.my/viewthread.php?tid=$tid" send="true" width="450" show_faces="true"></fb:like>
复制代码

手机版|大马资讯论坛  

GMT+8, 2024-4-20 08:03 , Processed in 0.017463 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表