I'm trying to do it with this code:
def create_event(options={})
options.assert_valid_keys(:uid, :event)
session = create_session
event = options[:event]
# Note: The start_time and end_time are the times that were input by
the event creator,
# converted to UTC after assuming that they were in Pacific time
(Daylight Savings or
# Standard, depending on the date of the event), then converted into
Unix epoch time.
# Basically this means for some reason facebook does not want to get
epoch timestamps
# here, but rather something like epoch timestamp minus 7 or 8
hours, depeding on the
# date. have fun!
#
# http://wiki.developers.facebook.com/index.php/Events.create
start_time = (event.start - 10.hours).utc.to_i
end_time = event.end ? (event.end - 10.hours).utc.to_i : start_time
session.post("events.create", {
'event_info' => {
'name' => event.title,
'category' => event.facebook_category.to_s,
'subcategory' => event.facebook_subcategory.to_s,
'host' => event.organizers.blank? ? event.place.title :
event.organizers_as_string,
'location' => event.place.title,
'street' => event.place.address,
'city' => event.city.to_s,
'description' => event.description || '',
'privacy_type' => 'SECRET',
'start_time' => start_time,
'end_time' => end_time
}.to_json
})
end
However..
c:/ruby/lib/ruby/gems/1.8/gems/mmangino-facebooker-1.0.12/lib/facebooker/parser.
rb:487:in `process': event_info parameter: array expected.
(Facebooker::Session:
:MissingOrInvalidParameter)
Any ideas on what's happening? :|
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---