我正在尝试在发送评论时捕获事件.我究竟做错了什么?我只是想将每个用户评论也更新到facebook组墙,这就是为什么我需要抓住这个事件.
<fb:comments numposts="10" ></fb:comments>
Run Code Online (Sandbox Code Playgroud)
FB.init和事件捕手:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'sensored-app-id',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
/* All the events registered */
FB.Event.subscribe('comments.add', function (response) {
// do something with response
alert("comment added");
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/fi_FI/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Run Code Online (Sandbox Code Playgroud) 我有PHP背景,我用Laravel(3和4)构建了几个Web应用程序.我也有在项目中使用RESTful API的经验.
我当前的客户端有一个ERP,它是一堆PHP文件.这些文件包含大约60K行的意大利面条代码.客户不希望投入更多资金来开发该系统,因此我们决定重写整个应用程序.我知道重写的所有风险,我也阅读了Joel的文章(http://www.joelonsoftware.com/articles/fog0000000069.html),因此不需要重构或重写讨论.
对于新的应用程序,我一直在考虑使用Laravel(4或5)构建RESTful API,并使用AngularJS构建前端.那是在我测试Meteor 1.0之前.这是非常有前途的,将它用于这个项目是非常好的.但它适合这种产品吗?
我客户的产品是这样的:
应用程序包含以下部分:用户,订单,优惠,时间跟踪,销售,报告,日历,客户.
因此,将Meteor用于此类项目是否明智,或者您更喜欢RESTful API + AngularJS组合?我在犹豫,因为我担心在使用Meteor的大型项目中,代码会变得混乱.