33 comments

  1. Eric

    I really appreciate this article, thank you.

    Can you add more instructions in regards to creating the Key Hash? I’m trying to use command line (with open ssl.. somehow), but if I do what the instructions say and go to where my .p12 file is saved and run that code it just tells me:
    “‘keytool’ is not recognized as an operable program or batch file.”

    I know that keytool is part of java but I’m confused how to put it all together with this.

    I used this code before to make what I think is a working Key, but I assume that somehow I have to mix all this together to use my .p12 file..

    C:Program FilesJavajre7bin>keytool -expo
    user.androidmyKeyStore | C:openssl-0.9.8
    :openssl-0.9.8k_WIN32binopenssl enc -a -e

  2. peng

    it works fine till handleInstallCheck() method,and i have installed facebookapp

    but handleAndroidSSOStatus() mehod is not called back.
    my enviroment — flash buidler4.7 air 3.7
    device — android

    • peng

      after several hours,i find something missing.
      I did not add this to xxx-app.xml file.

      Now it works.
      but i do not see the log out interface,don’t we need one ?

      • afterisktech

        It’s not a facebook login, its an authorization for app, so you don’t need to log out. If user decides to de-authorize the app they’ll do it via facebook tools.

  3. Giorgos

    Hi guys,

    really nice work. Is the extension and the sample still available?

    The download link doesn’t seem to work anymore.

    many thanks

    GA

  4. Galaxia

    Hi guys,

    I notice that the first download link is broken, but the download link at the end works 😀

    Everything works fine until I try to build it and it keeps saying “extension was not found for the target platform”. After I grind a lot and I finally find that the ANE specify the platform to be Android-ARM, but I am not able to set it using flashdevelop. Any clues on what should I do, or the ANE support android platform too?

    Many thanks

      • Galaxia

        Sorry for the misunderstanding. I am now able to have it work for android.
        But when i call _ssoi.authorize(FACEBOOK_APP_ID, true)
        it give me 2 response, first a AndroidSSOEvent.NO_SESSION
        Then it returns AndroidSSOEvent.AUTHORIZED again
        Is it an intended result or am I missing something?

        Thanks

  5. Stephan Bezoen

    Hi, I’m testing your extension to see if we can use it in our application, but I get the following error:

    AndroidSSOInterface Status: Something is wrong in fb UI.
    AndroidSSOInterface Code: dialogError

    This is then followed by a AndroidSSOEvent.ERROR event.
    Can you tell me a bit more about when this error occurs? This happens on an HTC One with Android 4.2.2. The Facebook app is reported as installed, and is working properly…

    • afterisktech

      The error happens on Facebook side, when the “DialogListener” which is part of their API throws the “DialogError”. All that is on java side of things, outside of the extension or your app. Why it throws that error? Possibly “authorization” dialog (popup) cannot show for some reason…To track this you need to try and debug your app using “logcat”, that’s where you (and i’m not promising) can see the details of what is going on on FB or Android OS end.

  6. marklonergan596715972

    I downloaded the files you supplied and when i tried to run it i am getting the following errors:
    C:afterrisk ssoandroid_sso_extensionsrcSSOExample.as, Line 29 1046: Type was not found or was not a compile-time constant: AndroidSSOEvent.
    C:afterrisk ssoandroid_sso_extensionsrcSSOExample.as, Line 50 1046: Type was not found or was not a compile-time constant: AndroidSSOEvent.
    I asume its something got to do with importing the AndroidSSOEvent.
    What am i overlooking? Help would be appreciated.

      • marklonergan

        Of course I simply forgot to import them. however when i import the .ane file to the fla file I ma getting the following error:
        Test Movie terminated.
        The content cannot be loaded because there was a problem loading an extension: Error: Extension namespace is invalid for C:UsersMarkAppDataLocalTempTmp_ANE_File_Unzipped_Packagesandroidsso.ane.
        I also noticed you mention this is just for authorizing the fb app. is this sufficient for accessing user data? . have a login working using the web view but would prefer the user dint have to go to the hastle of entering details.

        • afterisktech

          Ok so the first issue has nothing to do with the SSO extension The extension version identified on the top of your xml is not compatible with the AIR libraries you’re using to compile the app. Please refer to adobe documentation. As far as user data goes…This extension is built to allow the streamlined login using FB app users might have installed and logged in to on their device. The user data access will require you to use public AIR Facebook API and request permissions for your app.

  7. Rick

    Hey this is excellent- Thank you soo much!
    We have a problem with GoViral and they are not responding to our support question.

    So I am wondering if we can do this via your ANE? If an android device has the Facebook app installed on it then our Game has problems because the Facebook app doesn’t share the same cookies as webview- So if we need to display other FB features in our game in webview the user is not logged in to Facebook.

    However if we do not have the FB app installed on the android device then our game calls the webview login for FB and all features work fine.

    If we can somehow use this function to ONLY call the webview window for login even IF the FB app is installed then the problem is solved :
    mFacebook.authorize(mActivity, permissions, Facebook.FORCE_DIALOG_AUTH,
    new LoginDialogListener());

    Can we do this using your ane?

      • Rick

        Ah, Yea I tried using that but it functions poorly on average/low connection signals.
        Do you know if there is a way to achieve the user remaining logged in after signing in if the FB app is installed?

        Our problem is if the FB app is called for login then the user can’t view other FB pages within our app. But if the FB app isn’t installed on the android device then it calls the webview window for login and all functions ok.

        I don’t want to abort my hard work so far but I feel there is no work-around.

        • afterisktech

          You can keep user logged in. That’s what SSO is for, but it needs to use the app. You can’t login from your app. It has to be either the FB app or the webview with their login form.

          • Rick

            Yep, that’s what we’re doing. We are logging in via FB app or Webview (which ever is prompted by native process) but once signed in only the Webview login allows the user to remain logged in and visit, share, like etc. If the FB app is present on the device and native process calls that to login with everything from that process on is like we are not even logged in- Although the user has successfully logged in.

  8. oztrachtman

    Thank you for the great extension!
    A small tip – I probably did something wrong when I followed the instruction on how to get my key hash and received an error when I tried to log in from my app. But Facebook made it a lot more simple for me to fix – they wrote my key in the error message and I just went and replaced it in my app settings. I think trying to log in once and get the error to know what your key is, is much easier. Thanks again.

  9. gio

    I don’t know why i can’t make a login with facebook,.. the facebook page opens but nothing else happens… what could be making wrong

  10. denysaw

    Sorry, but “Download the ANE and example here” link is already broken (404). Can you upload elsewhere, pls?

  11. mystalurdimensh

    This may be a noobish question, but could someone please tell me how to make this work in Flash CS6 IDE? I have a mobile AIR project and setting the .as file as a main class kinda works, but how do I trace/pass results from it? I cannot access anything that’s on stage from the provided .as file.

  12. Paulo Mann

    There’s any way you could remove the publish_stream hardcoded? It’s not working now because of this.

  13. Paulo Mann

    Can you remove the publish_stream from the permissions and make another ane? It’s not working because facebook changed it’s permissions, maybe let we choose permissions from your API would be great. Thanks.

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>