= rest-graph changes history == rest-graph 1.4.4 -- 2010-08-06 * [RailsUtil] Fixed a bug that empty query appends a question mark, that confuses Facebook, so that redirect_uri didn't match. == rest-graph 1.4.3 -- 2010-08-06 * [RestGraph] Fixed a bug in RestGraph#fbs, which didn't join '&'. Thanks, Andrew. * [RailsUtil] Fixed a bug that wrongly rewrites request URI. Previously it is processed by regular expressions, now we're using URI.parse to handle this. Closed #4. Thanks, Justin. * [RailsUtil] Favor Request#fullpath over Request#request_uri, which came from newer Rack and thus for Rails 3. == rest-graph 1.4.2 -- 2010-08-05 * [RestGraph] Added RestGraph#fbs to generate fbs with correct sig, to be used for future parse_fbs! See the bug in RailsUtil. * [RailsUtil] Added iframe and write_cookies option. * [RailsUtil] Fixed a bug that write_session didn't parse because parse_fbs! reject the fbs due to missing sig. * [RailsUtil] Fixed a bug that in Rails 3, must call safe_html to prevent unintended HTML escaping. Thanks, Justin. * Thanks a lot, Andrew. == rest-graph 1.4.1 -- 2010-08-04 * [RestGraph] Call error_handler when response contains error_code as well, which came from FQL response. Thanks Florent. * [RestGraph] Added RestGraph#parse_signed_request! * [RestGraph] Added RestGraph#url to generate desired API request URL, in case you'll want to use different HTTP client, such as em-http-request, or pass the API request to different process of data fetcher. * [RestGraph] Added an :cache option that allow you to pass a cache object, which should respond to [] and []= for reading and writing. The cache key would be MD5 hexdigest from the URL being called. pass :cache => Rails.cache to rest_graph_setup when using RailsUtil. * [RailsUtil] Pass :cache => Rails.cache to rest_graph_setup to enable caching. * [RailsUtil] Favor signed_request over session in rest_graph_setup * [RailsUtil] Now it's possible to setup all options in rest-graph.yaml. == rest-graph 1.4.0 -- 2010-07-15 Changes only for RailsUtil, the core (rest-graph.rb) is pretty stable for now. * Internal code rearrangement. * Removed url_for helper, it's too hard to do it right. * Removed @fb_sig_in_canvas hack. * Added rest_graph method in helper. * Fixed a bug that logging redirect but not really do direct. * Now passing :auto_authorize_scope implies :auto_authorize => true. * Now :canvas option takes the name of canvas, instead of a boolean. * Now :auto_authorize default to false. * Now :auto_authorize_scope default to nothing. * Now there's :write_session option to save fbs in session, default to false. == rest-graph 1.3.0 -- 2010-06-11 * Now rest-graph is rescuing all exceptions from rest-client. * Added RestGraph#exchange_sessions to exchange old sessions to access tokens. * Added RestGraph#old_rest, see: http://developers.facebook.com/docs/reference/rest/ * Now all API request accept an additional options argument, you may pass :suppress_decode => true to turn off auto-decode this time. e.g. rg.get('bad/json', {:query => 'string'}, :suppress_decode => true) This is for Facebook who didn't always return JSON in response. * Renamed fql_server to old_server. * Favor yaji/json_gem first, then falls back to json, and json_pure. * Fixed a bug that cookie format from Facebook varies. No idea why. for RailsUtil: * Big and fat refactoring in RailsUtil, see example for detail: http://github.com/cardinalblue/rest-graph/tree/rest-graph-1.3.0/example * url_for and link_to would auto pass :host option if it's inside canvas. == rest-graph 1.2.1 -- 2010-06-02 * Deprecated RailsController, use RailsUtil instead. * Fixed a bug that passing access_token in query string in RestGraph#authorize_url * Fixed a bug that Facebook changed the format (I think) of fbs_ in cookies. Thanks betelgeuse, closes #1 http://github.com/cardinalblue/rest-graph/issues/issue/1 == rest-graph 1.2.0 -- 2010-05-27 * Add RestGraph#parse_json! * Add RailsController to help you integrate into Rails. * Simplify arguments checking and require dependency. * Now if there's no secret in RestGraph, sig check would always fail. * Now there's a Rails example. http://github.com/cardinalblue/rest-graph/tree/master/example * Add error_handler option. Default behavior is raising ::RestGraph::Error. You may want to pass your private controller method to do redirection. Extracted from README: # You may want to do redirect instead of raising exception, for example, # in a Rails application, you might have this private controller method: def redirect_to_authorize error = nil redirect_to @rg.authorize_url(:redirect_uri => request.url) end # and you'll use that private method to do error handling: def setup_rest_graph @rg = RestGraph.new(:error_handler => method(:redirect_to_authorize)) end * Add log_handler option. Default behavior is do nothing. You may want to do this in Rails: RestGraph.new(:log_hanlder => lambda{ |duration, url| Rails.logger.debug("RestGraph " \ "spent #{duration} " \ "requesting #{url}") }) * Add RestGraph#fql_multi to do FQL multiquery. Thanks Ethan Czahor Usage: rg.fql_multi(:query1 => 'SELECT ...', :query2 => 'SELECT ...') == rest-graph 1.1.1 -- 2010-05-21 * Add oauth realted utilites -- authorize_url and authorize! * Fixed a bug that in Ruby 1.8.7-, nil =~ /regexp/ equals to false. It is nil as expected in Ruby 1.9.1+ == rest-graph 1.1.0 -- 2010-05-13 * Main repository was moved to http://github.com/cardinalblue/rest-graph Sorry for the inconvenience. I'll keep pushing to both repositories until I am too lazy to do that. * Better way to deal with default attributes, use class methods. * If you want to auto load config, do require 'rest-graph/auto_load' if it's rails, it would load the config from config/rest-graph.y(a)ml. if you're using rails plugin, we do require 'rest-graph/auto_load' for you. * Config could be loaded manually as well. require 'rest-graph/load_config' and RestGraph::LoadConfig.load_config!('path/to/rest-graph.yaml', 'env') == rest-graph 1.0.0 -- 2010-05-06 * now access_token is saved in data attributes. * cookies related methods got renamed, and saved all data in RestGraph * parse failed would return nil, while data is always a hash == rest-graph 0.9.0 -- 2010-05-04 * renamed :server option to :graph_server * added :fql_server option and fql support. * cookies related parsing utility is now instance methods. you'll need to pass app_id and secret when initializing * if sig in cookies is bad, then it won't extract the access_token == rest-graph 0.8.1 -- 2010-05-03 * added access_token parsing utility == rest-graph 0.8.0 -- 2010-05-03 * release early, release often