daogr / facebook-actionscript-api

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

FacebookSession properties are missing or incorrect #285

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Login to facebook using the Mobile API.
2. Trace out the FacebookSession properties.

What is the expected output? What do you see instead?
The expected output is values for all of the session properties. Instead, 
sessionKey, secret, and sig are all null, and the expireDate is incorrect.

What version of the product are you using? On what operating system?
1.6 on Windows 7 using Air 2.6.

Please provide any additional information below.
This is an extremely blocking bug. These properties are needed to have our 
server connect via the Facebook Java API.

Original issue reported on code.google.com by bmj...@gmail.com on 6 Apr 2011 at 1:25

GoogleCodeExporter commented 8 years ago
Can you please provide some sample code?

Original comment by rovertn...@gmail.com on 7 Apr 2011 at 8:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It's pretty straightforward... Anything along these lines:

private function a():void {
    FacebookMobile.init(APP_ID,
        function(response:Object, fail:Object):void {
            if (null != response) {
                FacebookMobile.login(function(response:Object, fail:Object):void {
                    if (null != response) {
                        var session:FacebookSession = FacebookSession(response);
                        trace("Session properties:");
                        trace("expireDate : " + session.expireDate);
                        trace("secret : " + session.secret);
                        trace("sessionKey : " + session.sessionKey);
                        trace("sig : " + session.sig);
                    }
                }, root.stage, ["email", "read_stream", "publish_stream"], webview);
            }
        });
}

Original comment by bmj...@gmail.com on 7 Apr 2011 at 8:38

GoogleCodeExporter commented 8 years ago
These values are not populated by FacebookMobile login. We get back the 
access_token property which is used to make graph calls.

Original comment by edwar...@gmail.com on 8 Apr 2011 at 9:43

GoogleCodeExporter commented 8 years ago
That's exactly what I'm saying... They *should* be populated. The JavaScript 
API populates them, so should this.

Original comment by bmj...@gmail.com on 8 Apr 2011 at 10:19

GoogleCodeExporter commented 8 years ago
Im using FacebookDesktop and, even calling getSession(), sessionKey stills 
null, i need this value for connection to facebook chat via X-FACEBOOK-PLATFORM.

How can i obtain this values? And I agree, if the properties are there, they 
should be populated.

Thanks!!!

Original comment by jac...@gmail.com on 9 Apr 2011 at 9:16

GoogleCodeExporter commented 8 years ago
After ours investigation i found this, hope it helps:

"About the session_key, if your app is using oauth, you can use the 
access_token given by a common login process. An access_token has the form: 
AAAAAA|BBBBBB|CCCCC you must take the BBBBBB and use it as a session key. "

Original comment by jac...@gmail.com on 10 Apr 2011 at 10:58

GoogleCodeExporter commented 8 years ago
I believe the reason why none of your values are set when you trace them is 
because passing in your response to FacebookSession(response) doesn't populate 
the values. You need to go like this:

var session:FacebookSession = FacebookSession();
session.fromJSON(response);

Original comment by rovertn...@gmail.com on 25 May 2011 at 3:48

GoogleCodeExporter commented 8 years ago
Hi guys!
How can i get sig from FacebookMobile.getSession() ?
trace("accessToken :: " + FacebookMobile.getSession().accessToken); // correct 
value
trace("secret :: " + FacebookMobile.getSession().secret); // null
trace("sessionKey :: " + FacebookMobile.getSession().sessionKey); // null
trace("sig :: " + FacebookMobile.getSession().sig); //null
trace("uid :: " + FacebookMobile.getSession().uid); //correct value

Why some of values are correct, and some of them are null?
Please answer!

Original comment by funnys...@gmail.com on 6 Mar 2012 at 12:01

GoogleCodeExporter commented 8 years ago
I have the same problem!

Original comment by elinton....@fontec.inf.br on 24 Aug 2012 at 7:07