要将喜欢和不喜欢的Facebook细节保存到数据库 [英] To save facebook like and unlike details to database

查看:61
本文介绍了要将喜欢和不喜欢的Facebook细节保存到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在网站中集成了Facebook like功能,但事实是我想在数据库中保存喜欢和不喜欢的细节,还有其他可行的方法吗?

Hi

I have integrated Facebook like feature in my website but the thing is that i want to save the like and unlike details in my database as well is there any onther possible way to do it?

推荐答案

使用js回调记录类似按钮的点击(可能是通过ajax调用返回到数据库).
Use a js callback to record the like button clicks (probably via an ajax call back to your db).
FB.Event.subscribe('edge.create', function(response) 
{
  // do something with response.session
});



请参阅 https://developers.facebook.com/docs/reference/javascript/FB.Event.订阅/以获取更多详细信息.



See https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/ for more details.


这篇关于要将喜欢和不喜欢的Facebook细节保存到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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