Redirect facebook after login


i am trying using Backendless stand alone with Ionic, i have setup the facebook login using javascript.

after the user login throw facebook the popup window not closed and it’s redirect to:

  • After login success it’s should be redirect to the app.
  • i am using the both enviroment localy (ionic and backendless).

here is the code that do login with facebook

function fbLogin() {
Backendless.UserService.loginWithFacebook(null, null, new Backendless.Async( successCallback, errorCallback ), null);
how i can solve this.


There is no free support for standalone version, please contact to get information about support for standalone version.

Hi, I have same problem… use Ionic with backendless me too . When i test my app inside browser i haven’t problem but if i use it on device registration work but return white page with this error “Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘file://’) does not match the recipient window’s origin (‘’).”

Have you used standalone version?

Hi, Valerio.
Could you try use loginWithFacebookSDK() method ? (you may need to connect the facebook library)

I have used Javascript guide in Backendless site with configuration explained

the problem is not only facebook but for all social login… I noticed that when i execute Backendless.UserService.loginWithFacebook in browser start another page for login where request data for access and after registration it’s automatically close… Instead on device this page doesn’t close and remains blank with that mistake

Hi Oleg,

i tried both, loginWithFacebook() and loginWithFacebookSDK() methods and not working.

but loginWithFacebookSDK() method give me this response:

URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.


That’s an error from Facebook. See this:

Hi Sergey! do you have any idea?

Hi Oleg!

Problem isn’t loginWithFacebook or loginWithFacebookSDK method…I have same error for all social login I see that in requst_url from browser

instead from device
I think problem is here...

To get the javascript method for social login using Backendless Javascript SDK 3.1.23 to work with Backendless Standalone version 3.X you need to make the following changes. If you are using local file system then will need to change below to support.

    Change SDK method _loginSocialin in the backendless.js file - the standalone Backendless.serverURL end with /api but e.origin is only the hostname, so if (e.origin == Backendless.serverURL) will never be true.
_loginSocial: function(socialType, fieldsMapping, permissions,
async, container, stayLoggedIn) {
Utils.addEvent('message', window, function(e) {
if (e.origin == Backendless.serverURL) {
var result = JSON.parse(;


_loginSocial: function(socialType, fieldsMapping, permissions,
async, container, stayLoggedIn) {
Utils.addEvent('message', window, function(e) {
var pathArray = Backendless.serverURL.split("/");
var protocol = pathArray[0];
var host = pathArray[2];
var url = protocol + '//' + host;
if (e.origin == url) {
var result = JSON.parse(;