daogr / facebook-actionscript-api

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

The white window of success #290

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Call: FacebookDesktop.init ( API_KEY, onLogin );
2.Call: FacebookDesktop.login(handleLogin, []);
3.

What is the expected output? What do you see instead?
After login, the login promt window should close and call handleLogin function.
The white window of success is not closing, so no further operations are 
availabale

What version of the product are you using? On what operating system?
Windows 7 x64,
Adobe Air, 2.6.0.19120,
Flash CS5,
GraphAPI_Desktop_1_6.swc

Please provide any additional information below.

Original issue reported on code.google.com by jevgenij...@gmail.com on 15 Apr 2011 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
This is related to issue 286, and the fix will be included in the next update.

Original comment by edwar...@gmail.com on 15 Apr 2011 at 4:41

GoogleCodeExporter commented 8 years ago
how long approximately will it take until update?

Original comment by jevgenij...@gmail.com on 16 Apr 2011 at 12:41

GoogleCodeExporter commented 8 years ago
how long approximately will it take until update?

Original comment by jevgenij...@gmail.com on 16 Apr 2011 at 12:41

GoogleCodeExporter commented 8 years ago
API 1.6.1 includes fix

Original comment by edwar...@gmail.com on 26 Apr 2011 at 9:52

GoogleCodeExporter commented 8 years ago
This is still happening, same exact thing using API 1.6.1 testing on a Motorola 
Xoom.  White window of success.

Original comment by a...@driftlab.com on 4 May 2011 at 11:14

GoogleCodeExporter commented 8 years ago
Please note that this is fixed when testing using AIR on the desktop but is 
still showing the white success screen on device.

Original comment by a...@driftlab.com on 4 May 2011 at 11:29

GoogleCodeExporter commented 8 years ago
Here is what it looks like.

Original comment by a...@driftlab.com on 4 May 2011 at 11:38

Attachments:

GoogleCodeExporter commented 8 years ago
Not sure if this helps but this is what I am getting when testing from the Xoom:

//  handleLocationChange : webView.location = 
http://touch.facebook.com/login.php?app_id=205204026176581&cancel=http://www.fac
ebook.com/connect/login_success.html?error_reason=user_denied&error=access_denie
d&error_description=The+user+denied+your+request.&fbconnect=1&next=http://www.fa
cebook.com/connect/uiserver.php?method=permissions.request&app_id=20520402617658
1&display=touch&redirect_uri=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_suc
cess.html&type=user_agent&fbconnect=1&perms=publish_stream%2Cemail%2Cuser_likes%
2Cuser_birthday&from_login=1&rcount=1
//  handleLocationChange : webView.location = 
http://touch.facebook.com/login.php?app_id=205204026176581&cancel=http://www.fac
ebook.com/connect/login_success.html?error_reason=user_denied&error=access_denie
d&error_description=The+user+denied+your+request.&iphone&next=http://www.faceboo
k.com/connect/uiserver.php?method=permissions.request&app_id=205204026176581&dis
play=touch&redirect_uri=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.
html&type=user_agent&fbconnect=1&perms=publish_stream%2Cemail%2Cuser_likes%2Cuse
r_birthday&from_login=1&refsrc=http://touch.facebook.com/login.php&e=1348029&ema
il=losrhumans@gmail.com
//  handleLocationChange : webView.location = 
http://www.facebook.com/connect/uiserver.php?method=permissions.request&app_id=2
05204026176581&display=touch&redirect_uri=http://www.facebook.com/connect/login_
success.html&type=user_agent&fbconnect=1&perms=publish_stream,email,user_likes,u
ser_birthday&from_login=1

And this is what I get when testing from the actual desktop emulator in Flash 
builder burrito:

//  handleLocationChange : webView.location = 
https://graph.facebook.com/oauth/authorize?scope=publish%5Fstream%2Cemail%2Cuser
%5Flikes%2Cuser%5Fbirthday&redirect%5Furi=http%3A%2F%2Fwww%2Efacebook%2Ecom%2Fco
nnect%2Flogin%5Fsuccess%2Ehtml&client%5Fid=205204026176581&type=user%5Fagent&dis
play=touch
//  handleLocationChange : webView.location = 
http://www.facebook.com/connect/uiserver.php?app_id=205204026176581&method=permi
ssions.request&display=touch&next=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogi
n_success.html&type=user_agent&fbconnect=1&perms=publish_stream%2Cemail%2Cuser_l
ikes%2Cuser_birthday
//  handleLocationChange : webView.location = 
http://www.facebook.com/connect/login_success.html#access_token=205204026176581%
7C2.2BXlE07sLXWNB5A4NcXUyQ__.3600.1304607600.3-100000189486687%7ClIU4AQl-dSSjFbO
74Ygxtbl45_M&expires_in=3607

Original comment by a...@driftlab.com on 5 May 2011 at 2:06

GoogleCodeExporter commented 8 years ago
Ok this is what I've done, total hack but at least gets me by for the time 
being, I've modified MobileLoginWindow.showWindow to this:

        protected function showWindow (req : URLRequest) : void
        {
            webView.addEventListener (Event.LOCATION_CHANGE, handleLocationChange, false, 0, true);

            var timer : Timer = new Timer (2000);

            timer.addEventListener  (
                                    TimerEvent.TIMER,
                                    function (event : TimerEvent) : void
                                    {
                                        try
                                        {
                                            var title : String = webView.title;

                                            if (title == "Success")
                                            {
                                                handleLocationChange ();

                                                trace ("timer stopped");
                                                timer.stop ();
                                                timer = null;
                                            }
                                        }
                                        catch (e : Error)
                                        {
                                            trace ("timer stopped");
                                            timer.stop ();
                                            timer = null;
                                        }
                                    });
            timer.start ();

            webView.loadURL (req.url);
        }

Basically sets a timer to spin and check the page title, when it says "Success" 
it kills the timer and manually calls the handleLocationChange method. (please 
note you will have to set the param event : Event to event : Event = null 
within that method else it will throw an error.

Original comment by a...@driftlab.com on 5 May 2011 at 2:23