开发者

Storing FB likes in database

开发者 https://www.devze.com 2023-03-22 10:33 出处:网络
I\'m working on picture contest site which have to allow user to vote with facebook like button. At the end of a round, a have to check all picture likes and store it in our database. Well, what\'s pr

I'm working on picture contest site which have to allow user to vote with facebook like button. At the end of a round, a have to check all picture likes and store it in our database. Well, what's proper way of doing this? How can I use links.getStats f开发者_如何转开发unction for getting that data and storing it in the database?

Similar question is found here: How can I store the number of facebook Likes of a particular url in my own database? but it isn't answearing my question because I have to get exact number of likes/votes in short period in time.

I'm using ASP.NET MVC but any other solution should be fine.


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
});

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

0

精彩评论

暂无评论...
验证码 换一张
取 消