MAXSTEELTURBOGO / facebook-actionscript-api

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

Bug in GetPublicInfo #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Instantiating the class with one parameter of three

What is the expected output? What do you see instead?
It should return the public info, but instead displays an error stating
there should be one and only one parameter passed in.

What version of the product are you using? On what operating system?
3.2, Mac OSX

Please provide any additional information below.
This can be fixed by changing the logic to test for only one parameter as
follows:

if (application_id == null && application_api_key==null &&
application_canvas_name==null) {
   throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}

if (application_id && !(application_api_key==null &&
application_canvas_name==null)) {
  throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}

if (application_api_key && !(application_id==null &&
application_canvas_name==null)) {
  throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}

if (application_canvas_name && !(application_id==null &&
application_api_key==null)) {
  throw new Error("You must specify exactly one of application_id,
application_api_key or application_canvas_name.");
}

Original issue reported on code.google.com by miragevi...@gmail.com on 17 Jun 2009 at 5:19

GoogleCodeExporter commented 9 years ago
Thanks for providing the fix, I have committed the update to the trunk. 

Original comment by wgorgic...@gmail.com on 31 Jul 2009 at 5:21