Two app point to same domain without subdomain and url prefix - redirect

I have a react app and a wordpress site.
Currently app.example.com points to react app. And example.com points to wordpress.
Now, I need both app to be called from same domain without using the sub-domain.
Therefore,
example.com/, example.com/contact-us, example.com/help, example.com/technology, etc ---> wordpress
example.com/login, example.com/signup and many other url ---> to react app.
To fix I found two ways:
I could add a prefix like example.com/r/other-react-url. All url with /r points to react app, can solve the issue.
Define all wordpress url in nginx, if found on map then wordpress else react.
Is there any other way to do it?

Related

Facebook login redirect error Prestashop tmsociallogin

I have a problem with facebook login on Presta Shop. I am using TemplateMonster Social login plugin (tmsociallogin). It worked a few months ago but now it stopped. I am receiveng error:
"Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."
Urls and paths are set correctly in apps settings I think (correct domain, correct redirect URL, correct app domain). You can see my setting on screen shots below.
I have found a lot of answers but everywhere I've seen that I have to uncheck "Use Strict Mode for Redirect URIs" in fb app settings. I cant do that - this option is hardly checked as "Yes" and I can not do anything about that.
Please anybody help me :( Prestashop version 1.6
Apps settings 1
Apps settings 2
Facebook error
It happens because Facebook has changed a security policy and forbidden to use nonstrict mode for a redirect. But the module was using this option to redirect to the same page after login. So now it causes the issue. In order to solve this, you need to remove all mentions about a "back" parameter within all files which are related to Facebook login functionality. I don't know exactly your version of the module but I think the list of files will be the same
controllers/facebooklogin.php
controllers/facebookregistration.php
views/templates/hook/header-account.tpl
views/templates/hook/social-login-buttons.tpl
In the *.tpl files remove only that entities which are related to facebook.
And in your Facebook API you must to add two redirect URLs.:
Whether you use Friendly URL
- your_domain/module/tmsociallogin/facebooklink
- your_domain/module/tmsociallogin/facebooklogin
or not
- your_domain/index.php?fc=module&module=tmsociallogin&controller=facebooklogin
- your_domain/index.php?fc=module&module=tmsociallogin&controller=facebooklink
Also, if you aren't sure yet which mode are you gonna use then you can add all four variants.

Facebook Login "The application domains must match the Facebook web game URL domains.."

I am creating an application to be able to log in with facebook on my page.
The problem is the following, I add without problem the following two domains:
www.fumigadorweb.com.ar
fumigadorweb.com.ar
The issue is that my site has two active domains, the other is elfumigadorweb.com.ar, the problem is that this domain is not allowing me to add it, it informs me of the following error:
Image - error
The application domains must match the Facebook web game URL domains
(https), mobile site URL, Unity binary URL, site URL, or secure URL of
the page tab. Fix the following domains:
I tried eliminating my other two records that it takes correctly, and adding only the one of the conflict, and neither did it.
Could you tell me what is the mistake I'm making? Do you need any other information?
From already thank you very much
elfumigadorweb.com.ar is not a sub domain of your website (http://www.fumigadorweb.com.ar). your website. Valid sub domains should have *.fumigadorweb.com.ar pattern in your case. If it could be el.fumigadorweb.com.ar instead of elfumigadorweb.com.ar then you could add it.
You have to create a new facebook app for elfumigadorweb.com.ar

Need to add multiple domains in a single Facebook Application

I am trying to add multiple domains in my Facebook App but not succeeded as yet,
I have researched a lot and got that Facebook keeps changing its settings time to time , adding multiple domains was not possible initially but then they made it possible then again it was made unavailable.
But got no update if it can be done now,
Anyhow, I tried to put multiple domains but got error
App domains must match the domain of the Secure Canvas URL, Mobile Site
URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct
these domains: www.chair.com, www.table.com
what does this error mean? and how to resolve it?
And is it possible to attach multiple domains with a single app?
Example of domains:
www.table.com
www.chair.com
www.desk.com
It's not possible, unless only the extension or subdomain is different.
e.g.
The following is possible:
table.com and table.co.uk and sub.table.com
The following is not:
table.com and chair.com

changeable subdomains facebook connect

The new version of site is not ready yet.Thats why we use a subdomain.To make the link more user friendly we made the links to be like userName.site.com or at this point userName.dev.site.com instead of dev.site.com/userName
main url
dev.site.com
some example urls
jack.dev.site.com
stefan.dev.site.com
If i try to login in with facebook at this url dev.site.com , everything is ok. But when i go to jack.dev.site.com im not logged in anymore if i try to loggin, facebook returns an error.Then if i go to dev.site.com i'm actually logged.
I try with
document.domain = "dev.site.com";
with no effect. Any ideas ?
If I understand correctly you have 2 versions of your app, one is 'live' and one is 'beta'. Because these two versions reside in different sub-domains, you must create two apps on facebook. That is, the same app can't be hosted on two different subdomains.

Facebook: Application Menu points to Connect URL for Facebook application

I have an IFrame app, and I would like to use some Connect features using javascript.
But when I set the Connect URL in the application settings, it then causes two problems.
1) The link for the app in the Application Menu now points to:
http://mydomain.com/myapp/
instead of:
http://apps.facebook.com/myapp/
2) The request opens in a new window (instead of the same window, as other apps do)
Is there any way to fix that? I'd like my application continue to use http://apps.facebook.com/myapp/ even after setting the Connect URL
Many thanks for reading
Well,
after 3 months you guys probably found out the answer. But as many others might have the same problem, as I did, the correct configuration seems to be the next one:
In the Canvas Callback URL you insert your serverĀ“s URL (where the work really happens)
In the Bookmark URL you insert something like this: http: slash slash apps dot facebook dot com slash YOURCANVASNAME slash - i.e., if your canvas name is acmeenterprises, so your Bookmark URL has to be http: slash slash apps dot facebook dot com slash acmeenterprises slash
The Connect URL is the main URL of your host - normally.
Hope it helps!
Alexandre.
I have the exact problem - on some pages (like profile settings) it shows iframe URL, and on some - correct apps.facebook... URL.
There is similar topic on fb forum. Seems like general bug
http://forum.developers.facebook.com/viewtopic.php?id=33364