Permalink
Browse files

Fixing target ids for the new publishUserAction they should not be a …

…json encoded array but rather just a string of comma separated ids.
  • Loading branch information...
1 parent 5477ad0 commit f8729aff310c06bbd5aab094f2729549e79fdad4 @digidigo digidigo committed Jul 24, 2008
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/facebooker/rails/publisher.rb
  2. +1 −1 lib/facebooker/session.rb
@@ -162,7 +162,7 @@ def template_id
end
def target_ids=(val)
- @target_ids = val.is_a?(Array) ? val : [val]
+ @target_ids = val.is_a?(Array) ? val.join(",") : val
end
end
@@ -317,7 +317,7 @@ def register_template_bundle(one_line_story_templates,short_story_templates=nil,
#
def publish_user_action(bundle_id,data={},target_ids=nil,body_general=nil)
parameters={:template_bundle_id=>bundle_id,:template_data=>data.to_json}
- parameters[:target_ids] = target_ids.to_json unless target_ids.blank?
+ parameters[:target_ids] = target_ids unless target_ids.blank?
parameters[:body_general] = body_general unless body_general.blank?
post("facebook.feed.publishUserAction", parameters)
end

0 comments on commit f8729af

Please sign in to comment.