Use multiple App Domains for one facebook App - facebook

I am using Facebook ads API and I want to use multiple App Domains for one Facebook app. Because I am using white label domains and all domains are accessing one server. Is there any way to add multiple App domains. Image

Related

Use multiple different domain for one facebook app

I have the Facebook app that is running perfectly fine. I just launched the new company and i would like to use the same Facebook approved app that works for both companies. Is there anyone know how to manage the two different domains in the same app.
Note I already add the domains in the Valid OAuth Redirect URls but how we can add two separate logo in the same developer app account.
Hope you understand what I mean.
Wahab

Facebook login with multiple apps

I have 2 mobile apps. These apps have different names and branding. However, as both these companies are partners, we have the same login system. This means the user should be able to use the same login details for both apps.
I want to add Facebook login to both of these apps.
Solution 1: Use same FB App ID
The easiest option is to use the same registered Facebook App for both applications.
The issue here is that I need a different logo & app name to appear when logging in with Facebook. However, the FB dashboard only allows you to specify one app name & logo for each app.
Solution 2: Create another app in FB Dashboard
Another solution is to create another app in FB developer portal, and use 2 different FB ids. The issue here is that if a user logs into both apps, it is not clear that they are using the same account. Before we had a fb_id attribute, but it looks like we cannot use this anymore. Also, a user can revoke certain permissions on one app, and not the other, causing things to be out of sync.
How can I solve this issue?

How to use facebook appid to work with multiple domains (not sub domains)

I have created an app on facebook and i am using that appid in my application to allow the users to login, like & share the content.
While creating the facebook app i have given a domain like "abc.com" in the "App Domains".
This is working fine when i access the page from "abc.com/mypage" but i want to do the same from "xyz.com/mypage", "xxx.com/mypage" etc....
The facebook login is working for only "abc.com" it is not working for otherdomains.
How can i make this work and i want the same behavior for multiple domains more than 2
Thanks,
You can only use one domain per "platform". Meaning, if you got 2 different Websites, you need to create 2 different Apps. But you can use the same App for a Website on one domain and a Page Tab or Canvas App on another domain (which is useful for testing on localhost, for example).
Solution is to have multiple applications.
Look closer at the Settings-Basic, you would find that the domain setting is at the top and is global. Try to add a second domain and you see this error message: "This must be derived from Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL".
And that's the solution: You can make your secure canvas url abc.com, mobile url xyz.com and siteUrl example.com.
I guess your abc.com is for "Website". So what you need to do is click "Add Platform - Facebook Canvas". And enter xyz.com/ as canvas url and example.com/ as mobile url. Then you can have three domain supporting signing in at the same time.
Facebook acknowledges that people have the need to use different domains for different purposes. But they decided to allow only one domain per purpose. The error message suggests that you may have up to five different url and hence five domains.

Use same app on multiple domains

I'm creating a Social Media management webapp. This webapp will be used by our customers on there own sites (read, own domains). The webapp connects to a facebook app that we own, to allow them to manage there pages.
I'm using the "Website" platform for the app. During development I've had the "Site URL" set to my localhost url, and the "App Domains" set to localhost. This has worked fine.
However I now realise that this app will not always be run from localhost. It will be run from many differnt domains. I've read many posts about how its not possible to do this anymore, or at least the max is 5 domains by adding multiple platforms.
So how am I supposed to do this? Will I need to create an app on my profile for each customer/site? Will I have to create an app on each customers facebook account and link its app ID to our webapp?
The solution for this was not so bad.
Since AccessTokens are portable, so you can generate them on a single domain, and then use them to access the API from any page.
To do this, I have setup a single page on my own server (not customers server), whos domain is in my Apps Domains property. This page just has the facebook JS SDK, and some code to handle whether or not to show a login or a logout button. I embed this as an iFrame inside my webapp (that can run from any URL). I use
FB.Event.subscribe('auth.authResponseChange' function {});
to look for status changes, then use the the JS postMessage method to send the result of this to the parent of the iFrame, who then sends it to the server. This AccessToken can then be used anywhere.

What is App Domain in Facebook Apps?

What is App Domain used for in Facebook Apps?
Somebody had asked the same in What are App Domains in Facebook Apps? but I didn't really get it.
What I am trying to do is "publish actions" from a mobile app. The object to be published must be stored in a separate web page. And the domain of the separate page is supposed to be included in app domains.
Is app domain applicable for Mobile apps as well?
Well AppDomain simply means where is located your application's server side files.
Your application only usable from that domain. Facebook needs data for cross domain and security issues.
Unless you're going to use FB auth for a website you don't need to fill App Domain input.
I encountered the same issue for my mobile app. To fix it, I set the App Domain to my domain. But that wasn't enough because I then got the error:
Error
You have specified an App Domains but have not specified a Site URL or a Mobile Web URL
puurbuy.com must be derived from your Site URL or your Mobile Web URL.
So I had to go one step further and enable "Website with Facebook Login" setting the URL to my homepage, even though I do not have a Facebook login on my website. A terrible work around in my opinion, but it worked.
Because not using Sandbox Mode:
1. Had to establish a category on appdetails page
2. Had to set Website with Facebook Login
3. Then able to set App Domain
Now the debug pulls in the correct information without error.
App domain is not something related to your app or web domain, this is basically a App Store address.
Simply write this line in App Domains.
apps.apple.com
this worked for me.