Permalink
Browse files

Update README

  • Loading branch information...
blixt committed Jul 30, 2012
1 parent 62b4c16 commit 099ef37283fef81f6ff16007b2b329744d548f93
Showing with 16 additions and 0 deletions.
  1. +16 −0 README.md
View
@@ -5,14 +5,25 @@ JavaScript.
## Example
+This example will load the most recent likes of the current user. It will first
+send the user to Instagram to authenticate with your application.
+
+The images will be preloaded before the callback is called, so that the user
+will see them all at the same time, instantly. If you want to use the data
+before the images are available, skip the final "true" argument and use the
+`InstagramImage.preload` function to preload the images (or a subset of them)
+later.
+
// Get an Instagram API client.
var instagram = new Instagram('your_client_id');
+
// Make sure the current user has been authenticated to Instagram.
// If the user is not authenticated, the browser will be redirected to
// Instagram's authentication page, then redirected back to this page.
if (!instagram.authenticate()) {
return;
}
+
// Get the most recent images of the current user, preloaded.
instagram.getLikes('self', function (images) {
for (var i = 0, len = images.length; i < len; i++) {
@@ -22,6 +33,11 @@ JavaScript.
}
}, true);
+## Notes
+
+This API is currently in a very early stage and is lacking a lot of info in the
+`InstagramImage` class. Watch this repository for updates and feel free to
+submit pull requests!
## MIT license

0 comments on commit 099ef37

Please sign in to comment.