daogr / facebook-actionscript-api

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

Facebook.batchRequest does not work if oauth=true #349

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use Facebook with oauth=true
2. call batchRequest

What is the expected output? What do you see instead?
The request should be executed and callback called. Nothing happen instead.

What version of the product are you using? On what operating system?
1.7

Fix:
in AbstractFacebook, I refactored adding a private getter:

private function get accessToken():String
{
  if((oauth && authResponse != null) || session != null)
  {
    return oauth ? authResponse.accessToken : session.accessToken;
  }else{
    return null;
  }
}

This is used in several places ( api(), callRestAPI()), and for this issue in 
batchRequest(): instead of "if (session)" I do "if (accessToken)".
Hope it helps.

Original issue reported on code.google.com by alexis.h...@gmail.com on 7 Sep 2011 at 9:10

GoogleCodeExporter commented 8 years ago
Good catch, thanks for the heads up! The fix will be added to the svn repo and 
be included in the next version

Original comment by edwar...@gmail.com on 14 Sep 2011 at 6:04

GoogleCodeExporter commented 8 years ago
added to 1.8

Original comment by edwar...@gmail.com on 6 Oct 2011 at 3:48