Method: ReFacebook::API#batch
- Defined in:
- lib/refacebook.rb
#batch(&block) ⇒ Object
Run a batch call to the API. This doesn’t return a APIError if there are errors since some of the calls could have valid responses. Please catch the errors yourselves!
Example code:
ret = @api.batch do |b|
b.auth_createToken
b.admin_getAppProperties :properties => ['application_name','callback_url']
end
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/refacebook.rb', line 102 def batch &block @in_batch = true block.call(self) @in_batch = false ret = self.batch_run :call_id => Time.now, :method_feed => @method_feed.to_json @method_feed = [] ret end |