3 Replies Latest reply on Nov 21, 2016 7:59 PM by fengd9946600

    Flash Facebook Mobile Integration

    Flash Mobile Facebook Level 1

      As facebook has revised the platform types for applications, I need a sample configuration of the facebook app to be configured so that a flash based mobile iOS app can connect to facebook login page and proceed from there.

       

      I have read online blogs where it is written to get the app id etc, but no information on app type. If I follow desktop based, I can create a website based facebook app but now my facebook login method throws invalid URI.

       

      Any suggestions are welcome.

        • 2. Re: Flash Facebook Mobile Integration
          fengd9946600 Level 1

          I am also working on an ane development named xfFB which is base on Facebook SDK 4 over iOS. I put the code below as native library for login:

          -----------------------

            [self dispatchEvent:@"LOGIN_IN_PROGRESS" withMessage: @"iOS login to facebook..."];

            FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];

           

            [login

             logInWithReadPermissions: permissions

             fromViewController:nil // block below is not executed or not interacting with the app.

             handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {

             if (error) {

             NSLog(@"Process error");

            [xfFB dispatchEvent:failed withMessage:[error localizedDescription]];

            } else if (result.isCancelled) {

             NSLog(@"Cancelled");

            [xfFB dispatchEvent:success withMessage:@"CANCEL"];

            } else {

            NSLog(@"Logged in");

            NSString *jsonString =[self obj2Json: (NSObject *)result];

            [xfFB dispatchEvent:success withMessage: jsonString];

            }

            }];

           

          ------------------

          The code did awake Facebook native but just simply return to my app without execute the handler block. I am wondering that whether the fb 4.x SDK can be integrated with ActionScript or not since it takes too many controls to let app to get involve the process.

          • 3. Re: Flash Facebook Mobile Integration
            fengd9946600 Level 1

            To accomplish the login, I found a callback will go the as3 app with a INVOKE event after executing the code above. You as3 app should listen to that event, then you need to open the returned url with your app's delegate for authorization. B@e careful in handling the received invoke, not only the url but also the option keys. The code inside the block will only be executed when the correct option keys pass to the delegate.