the two alexs

Koala 1.0.0.beta2 released!

Hey everyone,

We’re excited to announce the release of Koala 1.0 beta 2!  Thank you all for the feedback and ideas that you’ve sent and we’ve incorporated over the last month — thanks to them, Koala is much stronger and easier to use than ever before.

Revised Photo Uploads

With this beta, we’ve revamped photo uploads, making the process simpler by replacing the file hash with a number of convenient options:

# 1) Path to a photo
@graph.put_picture(path_to_my_file)
# 2) Upload a file directly
@graph.put_picture(file_class_object)
# 3) Rails 3 file uploads (ActionDispatch::Http::UploadedFile)
@graph.put_picture(params[:file])
# 4) Sinatra file uploads (Hash)
@graph.put_picture(file_hash)

See more about the new photo interface on the updated Koala wiki.

Important note: the new, final interface is not backwards compatible, so you’ll have to update your code once you upgrade to beta2.  Sorry about that :\

Other Updates

  • Added put_connection and delete_connection convenience methods, which can be used for manipulating albums and provides future compatibility with new Graph API methods.
  • You can now provide an http_options hash to any method as the final parameter (see http_services.rb for more info).
  • You can test your apps against Facebook’s beta tier by passing :beta => true in the http options for any method.
  • TestUser#befriend now requires user info hashes (id and access token) due to Facebook API changes
  • Koala’s APIError is now < StandardError, not Exception

Upgrading

To install the beta, just run sudo gem install koala –pre.  (This seems to work for both 0.10 and 1.0.0.beta1.)

To 1.0

In the next few weeks, we’ll be adding native Typhoeus file upload support and working through the fork and pull queues, which are filled with great ideas.  We’ll probably release one more beta to let you all play with Typhoeus uploads, and once that dust settles we’ll release the final version.

As always, please send us any feedback, comments, and questions!  We’re happy to hear from you.

Best,

The Koala Team
(Alex, Chris, Rafi, and the folks at Context Optional)

Koala 1.0 beta!

Hey everyone,

We’re very excited to announce the beta release of Koala 1.0!  This is a huge release, well deserving of the version bump.  With this update, we’ve expanded Koala to support the entire current Facebook platform and have made improvements throughout the library to make Koala faster, easier, and more stable.

Photo Uploads

You read that right — Koala now supports photo uploads!  We’ve integrated Nick Sieger’s multipart-post gem to provide support through Net::HTTP.  Koala’s Graph API now offers a #put_picture method as well as support for posting file to Facebook through any Graph or REST API method.

# put_picture requires a hash containing info about the photo to upload
file_hash = {
  "path" => 'path/to/some-image-file.jpg',
  "content_type" => 'image/jpeg'
}

@graph.put_picture(file_hash, :message => "I've uploaded a photo!")
# => { "id" => FACEBOOK_UID_FOR_THE_PHOTO }

You can learn more about photo uploads here on the Uploading Photos wiki page.

Photos are in beta

During this beta period, we’ll be working hard to make photo uploads as simple as the rest of Koala.  By the time we officially launch 1.0, you’ll be able to easily upload photos using File objects, temporary uploads to Rails or Sinatra, or from any other source using the same hash system we have now.  We’ll also incorporate native support for Typhoeus file uploads as soon as that’s released (huge thanks to our friend JT Archie for implementing that feature).

Other Enhancements


API Methods:

  • GraphAPI#delete_like: self-explanatory and useful. (Thanks, waseem!)
  • OAuth#parse_signed_request: updated to support Facebook’s current canvas encryption plans.

Internal improvements:

  • For public requests (e.g. no access token), Koala now uses http instead of https to improve speed; this can be overridden globally or per request.
  • Read-only REST API requests now go through Facebook’s faster api-read server.
  • For consistency, GraphAPI#delete_object will now raise an error if there’s no access token (like #put_object and #delete_like).

Test Suite improvements:

  • We’ve expanded the tests for the HTTP service modules.
  • Live tests now verify that the access token has the necessary permissions before starting.
  • We’ve replaced the 50-person network test, which often took 15+ minutes to run live, with a much faster 5-person test.

Installing 1.0.0.beta

Installing the beta is simple — just run

sudo gem install koala --pre

Download the new version and give it a go.  If you hit any problems with photo uploads, the under-the-hood improvements, or anything else, please open a ticket on Github and we’ll get it fixed.  As always, too, if you have any questions/comments/feedback, just drop us an email.

Happy coding!

The Koala Team
(Alex, Chris, Rafi, and the folks at Context Optional)

Koala 0.10 released!

I’m excited to announce the release of Koala 0.10!

New Features

In this release, we’ve added support for Facebook’s new Test User API — huge thanks to Rafi Jacobi, my colleague at Context Optional, for contributing this feature. With the TestUsers API class you can create individual test user accounts:

test_users = Koala::Facebook::TestUsers.new(app_access_token)
# returns the test user's information
test_users.create(is_app_installed, permissions)

You can also make friend connections between your test users, delete them, and so on. You can also create a whole network of test users who are friends with each other using our create_network method. Of course, everything is tested (though the live tests for test user networks take a long time) — all this and more is documented in the Koala wiki.

With 0.10, we’ve also made the access_token property accessible (read-only) and fixed a minor bug.

Upcoming Release

Chris and I are working on support for image and video uploads. We’ve had several requests for this and are eager to add this last feature and hit 1.0, and hope to have it done early next year. (Since neither Net::HTTP nor Typhoeus natively support multipart POST uploads, it’s slightly more complicated than most features.) Stay tuned!

Happy holidays,

Alex

Koala 0.9.1 released

Hey everyone,

We’ve just released Koala 0.9.1. This release contains fixes to make the Koala test suite compatible with Ruby 1.9.2 and resolves two gem configuration issues that were reported by developers on Rails 3.

As always, let us know if you find any bugs or have any requests or suggestions for the next release — just open an issue on Github.

Cheers,

Alex
http://github.com/arsduo/koala/

Koala 0.9 released!

Hey everyone,

We’re very excited to announce the release of Koala 0.9!

This version adds several useful new features:

  • OAuth#parse_signed_request, to handle Facebook’s new authentication scheme
  • A GraphCollection class to provide paging support for the GraphAPI#get_connections and #search methods, something previously very awkward (thanks to to jathedrummer for the great contribution!)
  • A #get_page method to easily fetch pages of results from GraphCollections
  • Support for a :typhoeus_options key in TyphoeusService#make_request’s options hash to control the Typhoeus call (for example, to set :disable_ssl_peer_verification => true)

And fixes several bug fixes:

  • Exchanging sessions for tokens now works properly when provided invalid/expired session keys
  • All paths provided to HTTP services start with leading / to improve compatibility with stubbing libraries
  • If Facebook returns nil for search or get_connections requests, Koala now returns nil rather than failing with an exception

Full documentation is available on the Koala wiki.

If you have any suggestions for the next version or have found any bugs, let us know!  Our current plans include:

  • Support for multipart uploads (event images, for instance)
  • Allowing requests for public data to use http rather than https, where possible.

If you’re not already on the mailing list, check it out — it’s a great place to ask questions, and we’re always happy to help.

As always, thanks to my co-developer Chris Baclig and to everyone at Context Optional for their invaluable help!

Best,

Alex
http://github.com/arsduo/koala

Koala 0.7.0 released!

Hey everyone,

I’m happy to announce that Koala 0.7.0 has been officially released! This version includes two major updates:

  • A new RealtimeUpdates class, which can be used to manage subscriptions for realtime user updates (see http://developers.facebook.com/docs/api/realtime)
  • Added greatly improved testing using mocks rather than live calls to Facebook; these are now the default set of tests.

We also added some minor but useful enhancements:

  • Added Koala::Response class (internally), which encapsulates HTTP results since Facebook sometimes sends data in the status or headers
  • Used that to add a get_picture method to the GraphAPI class, which fetches an object’s picture from the redirect headers
  • Much other internal refactoring
  • Updated readme, documentation, and changelog

Download the latest gem and check it the code at http://github.com/arsduo/koala!

As always, I want to thank my co-contributor Chris Baclig for his invaluable work, which has made this project so much better.  I also want to thank Jeremy Dunn for contributing most of the realtime updates code, and Adeel Ahmad for discovering the picture issue and its source.

Finally, if you know what Koala is and you’re not yet part of our Google Group, come join us!  It’s a great place to ask any questions you have about Koala or about the Facebook APIs in general.

Have a great Wednesday,

Alex

« Previous Page
koppel badge miley badge