latest version ins...">

Ionic Facebook Connect on Android - URL Return Problem?

I have a general question with the location for "ionic framework" -> latest version installed .. (CLI v 1.3.0)

for testing the application with ion feed and chrome: no problem, we can get the full path url (basically for the reverse url with "openfb.js" services "for examples) //////////

context = window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)),

baseURL = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + context,

      

OR:

if (!window.location.origin) {
  window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}

      

////// BUT with ionic running android i have info theses popup about my url path or location on android (debug) .. result: file: //android_asset/www/index.html#/app/messages (for my general location in page posts)

BUT return url for fbconnect services is calculated using the context: "file: // android_asset /"

and facebook connection in this case get error: "uri must be absolute" .. or ... if I force the location for my url: "127.0.0.1" or "localhost" (: 8100 s or not info port also tested)

I always get the error: "uri must be absolute" or the connection was rejected with a tooltip popup and force-close the app ... I don't have a solution for this. All other function of my app with api server connection is ok ...

Thanks for the help in resolving openfb issue on android device (i think same issue for ios) ...

Oby.

+3


source to share


1 answer


To do this, you will replace the openFb file with this oepenfb repository file .

And also you need to add one plugin 'org.apache.cordova.inappbrowser'.



On facebook OAuth redirect add this " http: //localhost/oauthcallback.html "

0


source







All Articles