Permalink
Browse files

Fix various parts of the docs

Summary:
Someone synced over my doc updates, so I guess I better put
them in the code. I also removed all references to joey, and hopeuflly
made all the links work.

Test Plan:
No code changes

DiffCamp Revision: 119644
Reviewed By: naitik
CC: lshepard, brent, naitik, mattwkelly, selekman
Revert Plan:
OK
  • Loading branch information...
1 parent c223856 commit 30e7e779621d3d29660f20ac8e47ff4bd7fa81b8 @ptarjan ptarjan committed May 19, 2010
Showing with 91 additions and 36 deletions.
  1. +10 −10 readme.md
  2. +6 −6 src/core/auth.js
  3. +64 −9 src/core/canvas.js
  4. +1 −1 src/core/init.js
  5. +1 −1 src/core/prelude.js
  6. +1 −1 src/core/ui.js
  7. +4 −4 src/data/data.js
  8. +3 −3 src/data/query.js
  9. +1 −1 src/xfbml/element.js
View
20 readme.md
@@ -12,7 +12,7 @@ social. With it you gain access to:
[Connect]: http://developers.facebook.com/connect "Facebook | Connect"
[FQL_User]: http://wiki.developers.facebook.com/index.php/User_(FQL) "FQL User Table"
[FQL_Connection]: http://wiki.developers.facebook.com/index.php/Connection_(FQL) "FQL Connection Table"
-[UI Dialogs]: http://developers.facebook.com/docs/?u=facebook.joey.FB.ui "UI Dialogs (to render dialogs like publish and share)"
+[UI Dialogs]: http://developers.facebook.com/docs/reference/javascript/FB.ui "UI Dialogs (to render dialogs like publish and share)"
This repository contains the open source JavaScript SDK that allows you to
utilize the above on your website. Except as otherwise noted, the Facebook
@@ -53,7 +53,7 @@ initializing ([FB.init()][FB.init]) the library with all the options turned on:
</script>
[examples]: http://github.com/facebook/connect-js/tree/master/examples/
-[FB.init]: http://developers.facebook.com/docs/?u=facebook.joey.FB.init
+[FB.init]: http://developers.facebook.com/docs/reference/javascript/FB.init
### Asynchronous Loading
@@ -142,11 +142,11 @@ In addition, there many events that you can subscribe to using
- auth.login
- auth.logout
-[FB.login]: http://developers.facebook.com/docs/?u=facebook.joey.FB.login
-[FB.logout]: http://developers.facebook.com/docs/?u=facebook.joey.FB.logout
-[FB.getLoginStatus]: http://developers.facebook.com/docs/?u=facebook.joey.FB.getLoginStatus
-[FB.getSession]: http://developers.facebook.com/docs/?u=facebook.joey.FB.getSession
-[FB.Event.subscribe]: http://developers.facebook.com/docs/?u=facebook.joey.FB.Event.subscribe
+[FB.login]: http://developers.facebook.com/docs/reference/javascript/FB.login
+[FB.logout]: http://developers.facebook.com/docs/reference/javascript/FB.logout
+[FB.getLoginStatus]: http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
+[FB.getSession]: http://developers.facebook.com/docs/reference/javascript/FB.getSession
+[FB.Event.subscribe]: http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe
API Calls
@@ -157,7 +157,7 @@ from Facebook into your site, as well as allowing you to submit data into
Facebook. The JavaScript SDK makes all this available to you via
[FB.api()][FB.api]:
-[FB.api]: http://developers.facebook.com/docs/?u=facebook.joey.FB.api "Server-Side API Calls"
+[FB.api]: http://developers.facebook.com/docs/reference/javascript/FB.api "Server-Side API Calls"
FB.api(
{
@@ -180,7 +180,7 @@ into your application. The most common example of this is the
**stream.publish** dialog. [FB.ui()][FB.ui] is the method that allows you to
trigger this and other dialogs. For example:
-[FB.ui]: http://developers.facebook.com/docs/?u=facebook.joey.FB.ui "UI Dialogs (to render dialogs like publish and share)"
+[FB.ui]: http://developers.facebook.com/docs/reference/javascript/FB.ui "UI Dialogs (to render dialogs like publish and share)"
FB.ui(
{
@@ -254,7 +254,7 @@ SDK with popular JavaScript libraries such as [Dojo][Dojo], [jQuery][jQuery],
[MooTools][MooTools], [Prototype][Prototype] and [YUI][YUI].
-[docs]: http://developers.facebook.com/docs/?u=facebook.joey.FB "Public API Documentation"
+[docs]: http://developers.facebook.com/docs/reference/javascript/ "Public API Documentation"
[Dojo]: http://www.dojotoolkit.org/
[jQuery]: http://jquery.com/
[MooTools]: http://mootools.net/
View
12 src/core/auth.js
@@ -104,11 +104,11 @@ FB.provide('', {
* : The comma separated permissions string. This is specific to a
* permissions call. It is not persistent.
*
- * [subscribe]: /docs/?u=facebook.joey.FB.Event.subscribe
- * [unsubscribe]: /docs/?u=facebook.joey.FB.Event.unsubscribe
- * [getLoginStatus]: /docs/?u=facebook.joey.FB.getLoginStatus
- * [login]: /docs/?u=facebook.joey.FB.login
- * [logout]: /docs/?u=facebook.joey.FB.logout
+ * [subscribe]: /docs/reference/javascript/FB.Event.subscribe
+ * [unsubscribe]: /docs/reference/javascript/FB.Event.unsubscribe
+ * [getLoginStatus]: /docs/reference/javascript/FB.getLoginStatus
+ * [login]: /docs/reference/javascript/FB.login
+ * [logout]: /docs/reference/javascript/FB.logout
*
* @access public
* @param cb {Function} The callback function.
@@ -164,7 +164,7 @@ FB.provide('', {
* is safer to use [FB.getLoginStatus()][FB.getLoginStatus] if you are
* unsure.
*
- * [FB.getLoginStatus]: /docs/?u=facebook.joey.FB.getLoginStatus
+ * [FB.getLoginStatus]: /docs/reference/javascript/FB.getLoginStatus
*
* @access public
* @return {Object} the current Session if available, `null` otherwise
View
73 src/core/canvas.js
@@ -32,7 +32,7 @@
*
* CLICK YOUR APP, CLICK EDIT SETTINGS, CLICK MIGRATIONS AND ENABLE
*
- * Using the New SDKs
+ * New SDKs
* ---------------------------------------------------------------------
*
* @class FB.Canvas
@@ -46,11 +46,35 @@ FB.provide('Canvas', {
_timer: null,
/**
- * Sets the size of the frame to the desired size.
+ * Tells Facebook to resize your iframe.
*
- * You probably want to call this without any parameters because
- * if width or height isn't specified, then they default
- * to the current size of the content.
+ * ## Migration Requirement
+ *
+ * To use this function, you MUST have enabled the *New SDKs*
+ * [migration](http://developers.facebook.com/blog/post/363).
+ *
+ * ## Examples
+ *
+ * Call this whenever you need a resize. This usually means, once after
+ * pageload, and whenever your content size changes.
+ *
+ * window.fbAsyncInit = function() {
+ * FB.Canvas.setSize();
+ * }
+ *
+ * // Do things that will sometimes call sizeChangeCallback()
+ *
+ * function sizeChangeCallback() {
+ * FB.Canvas.setSize();
+ * }
+ *
+ * It will default to the current size of the frame, but if you have a need
+ * to pick your own size, you can use the params array.
+ *
+ * FB.Canvas.setSize({ width: 640, height: 480 }); // Live in the past
+ *
+ * The max width is whatever you picked in your app settings, and there is no
+ * max height.
*
* @param {Object} optional
*
@@ -84,11 +108,42 @@ FB.provide('Canvas', {
},
/**
- * Turns on or off continual adjustment of the iframe's size
- * Used to be known as: startTimerToSizeToContent
+ * Starts or stops a timer which resizes your iframe every few milliseconds.
+ *
+ * Used to be known as:
+ * [startTimerToSizeToContent](http://wiki.developers.facebook.com/index.php/Resizable_IFrame)
+ *
+ * ## Migration Requirement
+ *
+ * To use this function, you MUST have enabled the *New SDKs*
+ * [migration](http://developers.facebook.com/blog/post/363).
+ *
+ * ## Examples
+ *
+ * This function is useful if you know your content will change size, but you
+ * don't know when. There will be a slight delay, so if you know when your
+ * content changes size, you should call [setSize](FB.Canvas.setSize)
+ * yourself (and save your user's CPU cycles).
+ *
+ * window.fbAsyncInit = function() {
+ * FB.Canvas.setAutoResize();
+ * }
+ *
+ * If you ever need to stop the timer, just pass false.
+ *
+ * FB.Canvas.setAutoResize(false);
+ *
+ * If you want the timer to run at a different interval, you can do that too.
+ *
+ * FB.Canvas.setAutoResize(91); // Paul's favourite number
+ *
+ * Note: If there is only 1 parameter and it is a number, it is assumed to be
+ * the interval.
*
- * @param {Boolean} optional Whether to turn the timer on or off - default on
- * @param {Integer} optional How often to resize (in ms) - default 100ms
+ * @param {Boolean} optional Whether to turn the timer on or off. truthy ==
+ * on, falsy == off. **default** is true
+ * @param {Integer} optional How often to resize (in ms). **default** is
+ * 100ms
*
* @author ptarjan
*/
View
2 src/core/init.js
@@ -108,7 +108,7 @@ FB.provide('', {
* this method. If you are using an appId, all methods **must** be called
* after this method.
*
- * [FB.ui]: /docs/?u=facebook.joey.FB.ui
+ * [FB.ui]: /docs/reference/javascript/FB.ui
*
* @access public
* @param options {Object}
View
2 src/core/prelude.js
@@ -94,7 +94,7 @@ if (!window.FB) {
/**
* Copies things from source into target.
*
- * @access protected
+ * @access private
* @param target {Object} the target object where things will be copied
* into
* @param source {Object} the source object where things will be copied
View
2 src/core/ui.js
@@ -164,7 +164,7 @@ FB.provide('UIServer', {
id = FB.guid();
if (!method) {
- FB.log('"' + params.method + '" is an unknown method.');
+ FB.log('"' + params.method.toLowerCase() + '" is an unknown method.');
return;
}
View
8 src/data/data.js
@@ -51,7 +51,7 @@
*/
FB.provide('Data', {
/**
- * Performs a parameterized FQL query and returns a [[joey:FB.Data.Query]]
+ * Performs a parameterized FQL query and returns a [FB.Data.query](FB.Data.query)
* object which can be waited on for the asynchronously fetched data.
*
* Examples
@@ -117,8 +117,8 @@ FB.provide('Data', {
* @param {String} template FQL query string template. It can contains
* optional formatted parameters in the format of '{<argument-index>}'.
* @param {Object} data optional 0-n arguments of data. The arguments can be
- * either real data (String or Integer) or an [[joey:FB.Data.Query]] object
- * from a previous [[joey:FB.Data.query]]().
+ * either real data (String or Integer) or an [FB.Data.query](FB.Data.query)
+ * object from a previos [FB.Data.query](FB.Data.query).
* @return {FB.Data.Query}
* An async query object that contains query result.
*/
@@ -131,7 +131,7 @@ FB.provide('Data', {
/**
* Wait until the results of all queries are ready. See also
- * [[joey:FB.Data.query]] for more examples of usage.
+ * [FB.Data.query](FB.Data.query) for more examples of usage.
*
* Examples
* --------
View
6 src/data/query.js
@@ -20,11 +20,11 @@
/**
* Object that represents the results of an asynchronous FQL query, typically
- * constructed by a call [[joey:FB.Data.query]]().
+ * constructed by a call [FB.Data.query](FB.Data.query)().
*
* These objects can be used in one of two ways:
*
- * * Call [wait][[joey:FB.Waitable.wait]]() to handle the value when it's ready:
+ * * Call [wait](FB.Waitable.wait)() to handle the value when it's ready:
*
* var query = FB.Data.query(
* 'select name from page where username = 'barackobama');
@@ -47,7 +47,7 @@
* document.getElementById('page').innerHTML = result[0].name
* });
*
- * * Wait for multiple waitables at once with [[joey:FB.Data.waitOn]].
+ * * Wait for multiple waitables at once with [FB.Data.waitOn](FB.Data.waitOn).
*
* Check out the [tests][tests] for more usage examples.
* [tests]: http://github.com/facebook/connect-js/blob/master/tests/js/data.js
View
2 src/xfbml/element.js
@@ -20,7 +20,7 @@
/**
* Base class for all XFBML elements. To create your own XFBML element, make a
- * class that derives from this, and then call [[joey:FB.XFBML.registerTag]].
+ * class that derives from this, and then call [FB.XFBML.registerTag](FB.XFBML.registerTag).
*
* @access private
* @class FB.XFBML.Element

0 comments on commit 30e7e77

Please sign in to comment.