Search code examples
javascripthtmlweibosinaweibo

Weibo like button


I am setting Weibo like button from the guide. And receiving interesting result that code that i write in jsFiddle is working but in the browser not. So what is the problem?

 <!DOCTYPE html>
    <html xmlns:wb="http://open.weibo.com/wb">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!--必填-->
    <meta property="og:type" content="app" />
    <meta property="og:url" content="应用的URL地址,请勿携带统计代码,分页网址请统一填写第一页链接" />
    <meta property="og:title" content="应用的显示名称标题,不建议携带网站名称等SEO信息" />
    <meta property="og:description" content="应用的文字描述,将直接显示在微博里,建议完整填写,不要重复填  写标题" />
    <!--选填-->
    <meta property="og:image" content="应用的显示缩略图" />
    <meta name="weibo:app:full_image" content="应用的原始大图" />
    <meta name="weibo:app:create_at" content="应用的创建时间" />
    <meta name="weibo:app:update_at" content="应用的更新时间" />
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
    </head>

<body>
<wb:like appkey="4Q1NnV"></wb:like>
</body>
</html>

Solution

  • Code is OK, perhaps active content is blocked by the browser - you should check in console what is going on