cbuchler
cbuchler

Reputation: 35

Using facebook connect on multiple domains/subdomains

I started developing a facebook app and I have two sites.

I have setup a Facebook app, and implemented the SDK so far.

In my app settings I added:

Later I call the getLoginUrl method with the redirect_uri parameter

$facebook->getLoginUrl(array('redirect_uri' => 'http://app.domain.com', 'display' => 'popup'));

I do get the URL, but when I do proceed this URL facebook tells me that the domain app.domain.com is not within my apps domains.

Which is weird since I added it there.

And my call back urls/redirect urls use as well

Am I doing something wrong, are am I assuming the wrong?

Any help appreciated.

Thanks!

Upvotes: 2

Views: 737

Answers (1)

Metablocks Corp
Metablocks Corp

Reputation: 1665

It is technically possible to use Facebook Connect on multiple domains, there are some limits (5 domains max).

So the key to doing this is adding all domains in the App Domain field under your app settings.

enter image description here

The PROBLEM, however, is that Facebook only lets you add domains that are derived from your Canvas URL or Site or Page tag URLs, so if you try to enter anything else you get an error that looks like this:

enter image description here

The SOLUTION is to create App on Facebook, Website, and Facebook Tab using the ADD PLATFORM button and then put in URLs that point to your other domains. Here is an example of what I mean:

enter image description here

If you use a unique domain for each field you can max out with 5 different domains. I have tested this technique with up to 3 domains, but i think it should work for all 5.

Note: Facebook admin features change from time to time, so all of this is subject to change

Upvotes: 1

Related Questions