集成 Facebook“点赞”功能链接到推荐系统
我正在建立一个带有推荐系统的网站。 让朋友注册该网站的用户可获得 5 积分。 让朋友从网站购买的用户可获得 1 积分。 我通过为每个用户提供一个特殊的推荐链接来做到这一点,他们可以将其发送给他们的朋友。 当朋友通过该链接注册/购买时,用户就会获得积分。
该网站还提供可在 Facebook 上“点赞”或在 Twitter 上发布的产品。 如果用户点击“喜欢”时通过 Facebook 墙上发布的链接推荐朋友,我想给他们积分。 我的页面上有 10 个产品,每个产品都有自己的“赞”按钮。 问题是,当用户单击“喜欢”时,所有 10 个产品都会被喜欢,而当用户单击“不喜欢”时,所有 10 个产品都会被不喜欢。我希望 1 个产品有 1 个喜欢/不喜欢。
我认为问题出在下面的代码中:
session_start(); 包含(“./include/koneksi.inc”); require_once("./include/global.inc");
$id = mysql_real_escape_string($_REQUEST['id']);
header("位置:detaildeal.php?id=$id");
非常感谢您的帮助。 提前致谢 大卫
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
David
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想在页面上的某个地方,您已经
确保每个产品的 href 都是唯一的。另外,为了确保这些点赞实际上最终会推广产品,每个产品页面都应该具有 文档。
Somewhere on the page I suppose you have
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.