node.js - Cordova - Inappbrowser facebook login -


i'm trying implement facebook login in app. have 3 scenarios :

  • user use desktop browser (working).
  • user use mobile app, hasn't fb app (not working working).
  • user use mobile app, logged fb app (not working).

so how proceed:

  1. i'm opening inappbrowser myserver.com/auth/facebook
  2. facebook auth app identified appears
  3. user enters crendentials, , fb callbackurl direct either myserver.com/auth/fb_success or myserver.com/auth/fb_fail
  4. in fb_success & fb_fail page, send postmessage defining state (success/fail)

it works fine on desktop browser, not on mobile app (i'm getting blank page).

i know inappbrowser not real dom window object, , cordova window doesnt support opener, postmessage not available: https://issues.apache.org/jira/browse/cb-4897

so wanted check location url, don't know how can access information. when redirects occurs, seems no more information available. tried figure out why loadstop event isn't showing me these url, no luck.

also facebook account on mobile, inappbrowser seems scoped/isolated, still asks me enter credentials.

how can share inappbrowser, notice phone has facebook session ? how can detect redirect , access location url after authentication, solve blank page ?

solution 1 working mobile without fb account binded phone :

so now, if user logged in facebook account (via facebook app), inappbrowser still ask login. idea how share state in myapp ?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -