0

I am working with the latest versions of Starling and FeathersUI using Flash Builder 4.7

Currently I have added a "log in/sign up through facebook" option into my mobile application. The option works by using the Feathers WebView component to open the url:

https://www.facebook.com/dialog/oauth?client_id=CLIENT_ID_HERE&redirect_uri=https://www.facebook.com/connect/login_success.html&scope=email

I then wait for the starling.events.Event.COMPLETE event which tells me the page has finished loading - I can then access the location of the WebView (browser) to get the access token to validate their log in.

My question is: If a user has the Facebook App installed already on their phone, how can I make my app automatically check the Facebook App for the users login, rather than sending to the web-browser log in page for facebook?

I am aware of ANEs that provide functionality for this, but is there a way without using an ANE? Perhaps there is a facebook log in page that gives the option of connecting through facebook app? This ANE (https://github.com/freshplanet/ANE-Facebook) seems to have that option, but am unsure where to direct the user to within my app in the WebView to have that "log in through facebook app" option appear?

I will later want to include things like Posting to users walls (if they choose to), sharing links etc. so perhaps I need to use a social plugin ANE (I dont think those work for desktop versions of the app though unfortunately).

NAMAssist
  • 321
  • 1
  • 4
  • 14
  • Does opening just `https://www.facebook.com` in AS3 webView **not** show Facebook's newsfeed if user is already logged in via Facebook App? If it does there is no need for the login URL, since that would be shown automatically if not already logged in... Mind you there's a client ID involved so dunno how that affects things. – VC.One Jan 23 '17 at 07:34
  • I do not believe the user will have a logged in session withing the webview. It appears to be different than the mobile apps browsers stored sessions (cookies or what-not). – NAMAssist Jan 23 '17 at 11:24

1 Answers1

0

This should help: https://developers.facebook.com/docs/facebook-login/android This document works with the pre-installed Facebook app.

theBrainyGeek
  • 584
  • 1
  • 6
  • 17