开发者

Facebook Developer Toolkit - difference between all.js and FeatureLoader.js.php

Ok can someone explain to me the difference between:

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>

and

<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
开发者_运维问答

They seem to be two completely different libraries, but which one is newer? The way you call FB.init is different. In FeatureLoader.js.php, you pass in your App ID (numeric). In all.js, you pass in a Javascript map with the appId (alphanumeric).

One thing I've noticed is with the fb:login-button control, the all.js version has way more features. You can set custom text, and you can set "perms" to request certain permissions when the user is prompted to install the app. These are things I need to do.

However, if I use all.js, then the Facebook Developer Toolkit no longer works (IsConnected() returns false no matter what).. Is this because the Facebook Developer Toolkip doesn't support whatever API all.js is calling? This is a bummer because there is apparently no other way to request permissions on logon, and I'd have to have a separate popup to grant a permission.

Thanks! Mike


The all.js URL is the new JS SDK and the FeatureLoader one is the older SDK. The new SDK is smaller, faster and better supported. It DOES support calling the REST API endpoints, just like the older one does, in addition to allowing you to call the Graph API using FB.api().


Ok did more research... seems all.js is the new OAuth 2.0/Graph API way of doing things, and Feature.js.php is the soon to be deprecated old-skool REST way of doing things..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜