Have you tried mini_fb? http://github.com/appoxy/mini_fb
@fb = MiniFB::Session.new(FB_API_KEY, FB_SECRET, @fb_session, @fb_uid)
<http://github.com/appoxy/mini_fb>@fb.call("photos.upload",
"filename"=>"<full path to file>")
Travis
On Wed, Apr 14, 2010 at 10:31 AM, melissa moreno <
melissamoreno1409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> hi i''m trying to upload photos to facebook using facebooker, in
the
> facebooker api there''s an example code, i try it and i have this
> error (in the view):
>
> NO METHOD ERROR
>
> undefined method ''photos_upload''
>
> here is the code:
>
> in the view:
>
> <% form_tag photos_url(canvas =>false), :html => {:multipart =>
> true, :promptpermission => ''photo_upload''} do %>
> Photo: <%= file_field_tag ''photo'' %>
> Caption: <%= text_area_tag ''caption'' %>
> <%= submit_tag ''Upload Photo'', :class =>
''inputsubmit'' %>
> <% end %>
>
> in the controller
>
> def create
> file = Net::HTTP::MultipartPostFile.new(
> params[:photo].original_filename,
> params[:photo].content_type,
> params[:photo].read
> )
>
> @photo = facebook_session.user.upload_photo(file, :caption =>
> params[:caption])
> redirect_to photos_url(:canvas => true)
>
> end
>
> please help me!!!.. I google it for a long time and i can''t find a
> solution :(
>
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.