01-07-2011 06:41 PM
We're trying get a basic actionscript example working that will allow a user to login to facebook or change users from within an app.
I have it working thus far:
1) initialize the app and
a) recognize if a session is active - display username and logout button or
b) recognize if no session active - display login button
2) login works the first time, app recognizes session and displays username and logout button
3) logout button always works (so far) - takes you back to login screen
4) the second time you login (i.e., you logged in, logged out, and logged in again, or even logout1-login1-logout2-login2 if a session was already active) it gives me this error before the login window appears:
ArgumentError: Error #2004: One of the parameters is invalid.
at MobileFacebookLogin/loginClick()[C:\...\Adobe Flash Builder Burrito Preview\MobileFacebookLogin\src\MobileFacebookLogi
The call to login() is identical both times:
FacebookMobile.login(loginHandler, stage, )
This is the logout call:
Let me know if you need any more information
Gavin and Frank
P.S. we're using:
Windows 7 Home Premium 64-bit version 6.1 (Build 7600) Adobe® Flash® Builder™ (code named Burrito) Preview Version GraphAPI_Mobile_1_5.swc blackberry-tablet-sdk-0.9.1 using the blackberry playbook simulation provided in Burrito
Solved! Go to Solution.
01-07-2011 06:56 PM
hey gavin (and frank),
im assuming that on line 492 thats where the login() method is invoked? have you tried doing a trace on each of the parameters before the method is called? just to see what they are at that second. sometimes a problem i run into is i dont realize that a method gets called more than the amount of times that i intend on it being called. either because of a listener, a loop, anything. so i would definitely look out for it being called more times than u think. a simple trace should tell you if thats the case. let me know what you find. good luck!
01-07-2011 09:10 PM
01-07-2011 09:23 PM
if you only have one button that has one event listener that calls runs one function after it responds to a mouse click then you shouldnt be having any issues with the function running twice. the stage that you are sending is your "root class". basically you are giving control of your entire stage by sending it into that function. its not really a security risk or anything, the facebook API probably needs full control of your sprites, objects, etc. im not sure what you meant by multiple listeners on the same labelbutton object. could you elaborate?
01-07-2011 09:50 PM
if you add the same event listener event with the same function, it shouldnt be a problem. but if you are adding multiple event listeners that listen for different events or fire different functions on the same object, then you might run into problems.
01-10-2011 04:26 PM
Solved it! (well, my dev partner did)
So it turns out that in between logging out and logging back in it is neccessary to set this.webView = null.
This is definitely an undocumented interaction (read bug).
01-11-2011 02:02 AM - edited 01-11-2011 02:03 AM
This is an error in the SDK and we're going to post a fix soon.
If you're linking from the source code, just comment out the line with "webView.dispose()" and you're fine.
05-08-2011 08:20 AM