/**
*like
*/
flashShowLike : function() {
var _this = this;
var dialog = FB.Dialog.create({
content : '<fb:like-box href="http://www.facebook.com/apps/application.php?id='+ this.initData.appId +'" width="360" height="400" show_faces="true" stream="false" header="true"></fb:like-box>',
closeIcon : true,
visible : true,
onClose : function() {
callBackFun(0);
_this.log('player close likewin');
}
});
var callBackFun = function(like) {
FB.Dialog.remove(dialog);
var flash = swfobject.getObjectById("flashApp");
if (like) {
flash["gameLikeComplete"]();
} else {
flash["gameLikeCancel"]();
}
flash = null;
};
FB.XFBML.parse(dialog);
FB.Dialog.show(dialog);
$(".fb_dialog_close_icon").attr("style", "background-position:center bottom;z-index:99;")
//事件监听
if (this.initData.likeEvent) {
return;
}
this.initData.likeEvent = true;
//点击like
FB.Event.subscribe("edge.create", function(resp) {
_this.post('ajax_get.php',{
'action' : 'like',
'uid' : _this.initData.playerId
},function(data){
callBackFun(data);
_this.log('player press like');
});
});
//取消like
FB.Event.subscribe("edge.remove", function(resp) {
callBackFun(0);
_this.log('player cancel like');
});
},
分享到:
相关推荐
Building web applications with maintainable and performant user interfaces is a challenge that many have faced for more than a decade, but no one has risen to this challenge quite like React.js....
Building web applications with maintainable and performant user interfaces is a challenge that many have faced for more than a decade, but no one has risen to this challenge quite like React.js....
And thanks to JavaScript support in AWS Lambda and powerful new serverless API tools like the Claudia.js library, you can build and deploy serverless apps end to end without learning a new language. ...
ChatBox like Facebook. Uses PHP
Create React App入门该项目是通过引导的。可用脚本在项目目录中,可以运行:npm start 在开发模式下运行应用程序。 打开在浏览器中查看它。 如果您进行编辑,则页面将重新加载。 您还将在控制台中看到任何棉绒错误...
optimized page load and full control of the UI, and isomorphic libraries are being used at companies like Walmart, Airbnb, Facebook, and Netflix. Publisher: O'Reilly Media Date: 2016-10-06 ISBN-10: ...
messaging systems like ICQ and AOL Instant Messenger, it has matured into an extremely robust protocol for all kinds of exciting creations. Facebook uses XMPP technology as part of its chat system. ...
Facebook uses XMPP technology as part of its chat system. Google uses XMPP to power Google Talk and its exciting new Google Wave protocol. Collecta has built a real-time search engine based ...
Facebook Like Button Pinterest Pin-It Button Google Plus One Button Image Handler 4 Numinix Disk Cache CSS JS Loader Responsive Homepage Product Carousels Zen Cart Version 1.3.8a, 1.3.9h, 1.5.0, ...
A Firefox extension for executing some Graph-like searches against Facebook.
一个简单的node.js模块,用于处理所有应用程序级别的通知(苹果推送通知,邮件和Facebook帖子) 安装 $ npm install notifier 或将其包含在package.json 注意:在“开发”和“测试”环境中,发送电子邮件被禁用。 ...
connect and communicate using famous communication channels like Skype, Slack, Web and Facebook. You'll also learn how to build intelligence into Bots using Azure Cognitive Services like LUIS, OCR, ...
You will be beginning with building simple applications like groceries list app, RSS Reader app to advanced apps like and image sharing app, guitar tuner app, a game and so on. By the end of the ...
In these books, the examples are solved in various languages like Go, C, C++, Java, C#, Python, VB, JavaScript and PHP. This book introduces you to the world of data structures and algorithms. Data ...
Facebook like button 291 Quick AdSense 292 Appendix B: Other SEO Resources 293 Online forums 293 Warrior Forum 294 Digital Point forum 294 The Keyword Academy 295 SEO Chat forums 295 SEO....
在JavaScript中,this对象是运行时基于函数的执行环境(也就是上下文)绑定的。 从react中的demo说起 Facebook最近一次更新react时,将es6中的class加入了组件的创建方式当中。Facebook也推荐组件创建使用通过定义...
Over the past few years, with services such as Facebook, Twitter and push notifications on smartphones, users are now getting used to being up to date with everything that happens all the time....
Clojure is an open-source programming language maintained and supported by Cognitect., and quickly gaining use across industries at companies like Amazon, Walmart, Facebook, Netflix, and more....
In these books, the examples are solved in various languages like Go, C, C++, Java, C#, Python, VB, JavaScript and PHP. This book introduces you to the world of data structures and algorithms. Data ...
Chrome Frame 会把最新版的Chrome Webkit 内核和JavaScript 引擎注入到IE中, IE浏览器将获得Chrome的性能和功能 目录 摘要 I ABSTRACT II 专业名词清单 III 第一章 绪论 1 1.1 研究背景与意义 1 1.2国内外相关...