请有人帮我如何使用图谱API向Facebook上的某人发送申请请求,例如,如果我已登录,并且我想使用图谱API向我的朋友发送申请请求我该怎么做呢。
答案 0 :(得分:0)
$app_id = "your application id";
$canvas_page = "your canvas page link";
$message = "Inviting you to my application";
$requests_url = "http://www.facebook.com/dialog/apprequests?app_id="
. $app_id . "&redirect_uri=" . urlencode($canvas_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"]);
}