Reputation: 23
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:
Look for this: the voucher starts at $6. Then, 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
Upvotes: 2
Views: 754
Reputation: 42266
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)
Upvotes: 2