开发者

How to require a Facebook like to change content on an external web site? (I'm not referring to a Facebook page)

I am writing because I've spent several days searching for the solution as to how CampusCred.com, for example, allows for an instant discount on an item if you "like" the page on Facebook. Here's an example:

http://www.campuscred.com/usc

Look for this: the voucher starts at $6. T开发者_如何学运维hen, hit "like." Then, note that the $6 just went down to $5.50. And if I unlike the link, it goes back to $6. Pretty neat!

I am trying to apply this to a script for an external web site where you have to hit "like" in order to receive a download link. Please advise, any help would be great!

Thanks Andrew


You need to subscribe a callback function to the Like button.

Here is the API documentation: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

The relevant events are edge.create (fired when the user likes something) and edge.remove (fired when the user unlikes something)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜