MAXSTEELTURBOGO / facebook-actionscript-api

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

GetPublicInfo.as logic refactor #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Check out the current main logic of GetPublicInfo.as:

http://code.google.com/p/facebook-actionscript-api/source/browse/trunk/source/ac
tionscript/com/facebook/commands/application/GetPublicInfo.as?r=310#55

{{{

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.");
}

}}}

How about this one:

{{{

for (var i:int = 0; i < arguments.length; i++)
    if (arguments[i] != null)
        break;

if (i == arguments.length)
    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 abc12hjc@gmail.com on 25 Sep 2009 at 9:13

GoogleCodeExporter commented 9 years ago
New release based of Facebook's Graph API is coming soon.  SDK which this issue 
depends on is no longer supported by Facebook.

Original comment by alan...@gmail.com on 29 Sep 2010 at 7:49