rfacebook and facebook image uploading api
Posted
by msarvar
on Stack Overflow
See other posts from Stack Overflow
or by msarvar
Published on 2010-03-08T20:59:09Z
Indexed on
2010/03/09
0:21 UTC
Read the original article
Hit count: 647
I'm using rfacebook gem to interact with facebook connect. And I'm having a problem with uploading images. As facebook api says, the data should be transferred in a hash like json object. So I'm making an hash
publish_values = {
:uid => @post.profile.channel_uid,
:message => @post.content,
:auto_publish => true,
}
unless @post.message.skip_link_info
publish_values[:attachment] = {}
publish_values[:attachment][:name] = @post.message.link_title unless @post.message.link_title.blank?
publish_values[:attachment][:caption] = @post.message.link_title unless @post.message.link_title.blank?
publish_values[:attachment][:description] = @post.message.link_description unless @post.message.link_description.blank?
unless @post.message.no_thumbnail || @post.message.link_image_url.blank?
publish_values[:attachment][:media] = [{ :type => 'image', :src => @post.message.link_image_url, :href => @post.short_uri }]
end
end
But It's not uploading any image to the facebook, the xml respons says "properties must be a dictionary". So I'm stuck in here for a couple days It doesn't make any sene
© Stack Overflow or respective owner