Integrating Facebook 'like' link into referral system
I am building a website with a referral system. Users who get their friends to sign up to the website gets 5 points. Users who get their friends to buy from the website gets 1 points. I do this by giving each user a special referral link that they can send to their friends. When the friends go through that link and sign up/buy, the user gets points.
The website also features products that can be facebook 'liked' or tweeted. I'd like to give the user points if they refer friends through the link posted on their facebook walls when they click 'like'. I have 10 products on a page and each have their own like button. The problem is when user click 'like', all 10 products got liked and when user click 'unlike', all 10 got unliked. I'd like it to be 1 like/unlike for 1 product.
I think the problem lies in the code below:
session_start(); include ("./include/koneksi.inc"); require_once ("./include/global.inc");
$id = mysql_real_escape_string($_REQUEST['id']);
header("Location: detaildeal.php?id=$id");
Your help is very very appreciated. Thanks in advance D开发者_C百科avid
Somewhere on the page I suppose you have
<iframe src="http://www.facebook.com/plugins/like.php?href= ...
Make sure that href is unique for each product. Also to make sure that these likes actually end up promoting the products, each product page should have the meta properties as described in the documentation.
精彩评论