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