要将喜欢和不喜欢的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.