Using Heroku I have an Iframe with a like
button. When the user clicks on like
it does indeed like the page but other likes
on the page don't vanish.
This is my listener
FB.Event.subscribe('edge.create', function(response) {
var user = '<?php echo idx($basic, 'name'); ?>'
var uid = '<?php echo idx($basic, 'id'); ?>'
$.post("utils.php", { user: user , method:'like', uid:uid},
function(data) {
$(".codeContainer").html(data.status);
$(".counterContainer").html(data.voucher);
},"json");
});
This asks for a promo code and posts it back. Do I need to do a manual reload? Also how do I bind other FB likes on the page to this function?
Instead of the iframe like HTML, use the HTML5 or xfbml version in your code. Then you can subscribe to the edge.create event.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.