You will find there's Content management systems that supports multiple sites, our features enables our customers (The website admin) for connecting towards the site facebook account to permit status updates, create occasions and upload pictures to Facebook from within the Content management systems.

The authentication must occur once since each site might have multiple site admins that not need the website Facebook user title and password. We use iframe and authenticate using $facebook->require_login() which redirects the consumer towards the Facebook login and authentication pages.

All of this works all right however when the consumer hits "Allow" the authentication will break because it is only going to redirect to whatever is incorporated in the "Publish-Authorize Redirect URL" area making the application obsolete for just about any other domain except the main one within the "Publish-Authorize Redirect URL"

I understand other API's authentication techniques as with Vimeo and YouTube will help you to specify a NEXT parameter the same as the "Publish-Authorize Redirect URL" also it can be set at run time.

How do i get this to work with multiple domains?

Any hints about this problem is going to be a big help

When the call back page is within your domain, that page could functions like a proxy, all you want do is pass the parameters necessary for proxy page to redirect the consumer towards the proper location. For instance I made use of the Link to the domain I wish to redirect as well as an ID needed that i can know which user I'm coping with.

My code finish up searching something similar to this:

Authorize link:

$authorizeURL = "http://world wide" . $facebookApiKey . "&v=1.&ext_perm=status_update&domainName=$domainName&path=/path/to/my/next/page.php"

and also the "proxy" code would really like something similar to this:

    $path =  $_GET['path']

    $query = $_GET['query']

    $domainName = $_GET['domainName']

    //if you possess a query, obtain the values such as this:

    parse_str($query, $queryValues)

    $id = $queryValues['id']

    // construct the url where your user originated from or where you would like them to become rerouted.

    $url = "http://$domainName/$path?$query"

    header("Location: " . $url)


This isn't the entire code, but you'll have a concept regarding how to get it done.

create a separated domain used just for Facebook authentication.