我正在尝试在页面选项卡应用程序中实现 facebook 请求。我在这里看到了教程http://developers.facebook.com/docs/appsonfacebook/tutorial/但问题是我希望下面的代码仅在有人访问类似的链接时执行
<a href = "something">Send to friends</a>
关于如何做到这一点的任何想法?谢谢!
$requests_url = "http://www.facebook.com/dialog/apprequests?app_id="
. $app_id . "&redirect_uri=" . urlencode($the_url_of_the_tab_page)
. "&message=" . $message;
if (empty($_REQUEST["request_ids"])) {
echo("<script> top.location.href='" . $requests_url . "'</script>");
} else {
echo "Request Ids: ";
print_r($_REQUEST["request_ids"]);
}