hi i am developing a facebook application using iframe.Invite friends is working fine now its opening in the same window, i need to show it in a popup window.
please help me.. here is the code
$app_id = "MY_APP_ID";
$canvas_page = "http://apps.facebook.com/MY_APP_NAME/";
$message = "MESSAGE";
$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"]);
}
Have you looked at the use of the javascript SDK’s
FB.uimethod? See http://developers.facebook.com/docs/reference/javascript/FB.ui/ and http://developers.facebook.com/docs/reference/dialogs/friends/ for more detail. You can use theFB.uimethod to create an invite dialog.