kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

MOBILE login not working on Flex 4.5 Mobile project #293

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I may just be using the login method incorrectly because takes in a few more 
arguments than the regular flex WEB facebook api needed... 

I'm using the prerelease Flex 4.5 with a Flex  Mobile Project and testing on my 
Nexus One.

here's what i came up with:

    public var permsArray:Array = new Array({perms:"user_birthday"});

      //this is how im building the login
        FacebookMobile.login(loginHandler,stage,permsArray,new StageWebView);

    //I also tried just
        FacebookMobile.login(loginHandler,stage,permsArray);
    //and got same results

When the button I have linked to the login function is pressed the screen goes 
white, and if i look real closely i see a "success" in the top left corner 
flash uickly, as if it is opening a webview and tring to open the facebook 
connect dialog. Then it goes back to my app. BUT, it's not actually a success, 
in the debugger it just goes strait to fail. Anyone have any idea? (i made sure 
i was logged out of facebook in my phones browser to be sure i wasnt just 
authenticating real quick or anything, but it couldnt have been that anyway 
because its triggering a fail)

and as for the rest i'm pretty confident i have it setup correctly, because 
nothing changes from the facebook web API to facebook mobile API

for example my init:

    FacebookMobile.init("MYAPPID",initHandler);

its the same as the web

Original issue reported on code.google.com by Bry...@gmail.com on 20 Apr 2011 at 12:07

GoogleCodeExporter commented 9 years ago
For your permissions, make sure they are an array of strings, rather than an 
array of objects with a "perms" property.

var permsArray:Array = ["user_birthday", "publish_stream", "friends_photos"];

Original comment by edwar...@gmail.com on 25 Apr 2011 at 5:46

GoogleCodeExporter commented 9 years ago
oh man, thanks! can't believe I didn't think of that! Thanks a lot!

Original comment by Bry...@gmail.com on 25 Apr 2011 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by rovertn...@gmail.com on 11 May 2011 at 4:40

GoogleCodeExporter commented 9 years ago
I have this same problem:
I can see the Success in the upper Left corner but the App is respoending after 
that. Im using

protected function login():void{
var permsArray:Array = ["email", "publish_stream"];
showBusy("Initialize Login");
                FacebookMobile.login(loginHandler,stage,permsArray,new StageWebView);
}

protected function loginHandler(success:Object,fail:Object):void{
    if(success){
    vStatus      = "Logged in successful";
                    currentState = "loggedout";
                    FacebookMobile.api("/me",getMeHandler);
                    vUserImage   = FacebookMobile.getImageUrl(success.uid,"small");

                }else{
                    if (fail != null ){
                        vStatus = "Logged in failed: "+fail.error.message;
                    }else{
                        vStatus = "Logged in failed";   
                    }
                }

                hideBusy();
            } 

Original comment by stan.byr...@gmail.com on 19 Sep 2011 at 11:51

GoogleCodeExporter commented 9 years ago
Sorry was not done: I'm Using GraphAPI_Mobile_1_7.swc. Now here is the good one:
This problem is only on my Tablet: Eee Pad Transformer TF101
But when I run the same code on my T-Mobile MyTouch 4G it works fine.

So what is the difference between the Andora Tablet 3.2 and Android 2.3.4 on a 
phone.

Let me know if you need more info.

Thanks
Stan 

Original comment by stan.byr...@gmail.com on 20 Sep 2011 at 12:02