[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1040
  • Last Modified:

Facebook friend Invite - how to not have it redirect

After setting up an app as 'Website with Facebook Login' - I am using the Facebook code below to allow a user to send invites for a web page. The function works, meaning it opens a new tab, and allows the user to select users and send a request to visit a webpage. The issue is that once the user selects friends to send an invite to, and clicks "Send Request"  the window/tab redirects to the canvas page url defined in the code below. Is there a way to have hte Invite feature open a new window or tab or a modal window, and just close after sending the requests versus redirecting to a page?

         $app_id = "xxxxxxx";

         $canvas_page = "somewebpage....";

         $message = "Would you like to join me in this great app?";

         $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: ";
1 Solution
Manoj PatilSr. Software EngineerCommented:
cbittnerAuthor Commented:
Great option, thanks

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now