changeable subdomains facebook connect - facebook

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.

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

redirect on facebook app install

Upon install of my app on a Facebook Page, I'd like to send the user to an URL with further instructions. I'm starting the installation with http://facebook.com/add.php?api_key=app_api_key&page=page_id, which installs but redirects the user to the Facebook Page itself. It seems like various forms of redirect were available at some point:
Post-authorize callback URL. I can no longer find that in App settings.
The next parameter for add.php. I can't seem to get this to work
I have seen some apps that do redirect upon install, so I believe this is possible. Maybe it's using an old Post-authorize setting that's no longer visible?
Any help or point would be greatly appreciated! I'm also not attached to using add.php, if there's a Facebook Connect method that does this I'd use that instead (I'm looking at profile.addtab though that doesn't seem to work either).
You can set the redirect URL in the app properties. You can no longer set it from the developer control panel in Facebook, but you can still set it using the REST api.
The list of app properties is here: http://developers.facebook.com/docs/appproperties/
To set the "post_authorize_redirect_url" you would use something like this:
https://api.facebook.com/method/admin.setAppProperties?
access_token=CURRENTTOKEN&
properties={'post_authorize_redirect_url':'http://mydomain.com/post_authorize_folder/'}
I am not completely clear on this, but I believe the url needs to point to a folder, terminated with "/" rather than a specific file.
The callback gets two parameters:
installed = 1 (true)
fb_page_id = the page id when your app was installed
First page that Canvas is point to should have
< script type='text/javascript'>top.location.href = 'REDIRECT-URL';< /script>
So when your app is opened it will automaticaly redirect to REDIRECT-URL
I'm not sure that you can avoid opening of application canvas page after installing application.

How to make an URL independant Facebook Application?

I'm working on a new module for TomatoCMS. Here you'll be able to post new content on the website and forward is to a fanpage on Facebook (as page admin).
While experimenting and trying to get things working, it seems like I HAVE TO put an application url ... Is this correct?
So I won't be able to reuse the module on another URL?
Is there a way to make it re-usable? (Not URL-specific)
I'm working in PHP (with Zend Framework) and the phpSDK.
Thanks for your insight :-)
If i am getting it right you want to have your code module work on any other application's domain url. If this is the case then to admin pages you need access token which need appid and appsecret which are bount to the application url with you registered. so you can't do it without a url.
I know this is late (older post) but it might be helpful to someone else perhaps.
From what I understand, if you're not designing an on line application (lets say for a program that runs on Windows), you would use::
https://www.facebook.com/connect/login_success.html as your redirect.
And then to attach the required permissions to the call, you'd add it as such::
https://www.facebook.com/connect/login_success.html&scope=email,user_online_presence,sms,offline_access