DG IZ; quick form in user edit

This commit is contained in:
danielvincent 2010-09-22 17:33:57 -07:00
parent ae58120deb
commit bc70ebdb95
2 changed files with 14 additions and 0 deletions

View file

@ -29,4 +29,12 @@ class ServicesController < ApplicationController
redirect_to edit_user_url current_user
end
def fb_post
id = 'me'
type = 'feed'
@res = MiniFB.post(@access_token, id, :type=>type, :metadata=>true, :params=>params)
redirect_to user_edit_url current_user
end
end

View file

@ -65,6 +65,12 @@
Connected to facebook as
- @response_hash = MiniFB.get(@access_token, 'me')
= @response_hash[:name]
- form_tag :controller => "services", :action => "fb_post"
= text_area_tag "message"
= submit_tag "send it off"
= link_to "Disconnect from Facebook", services_destroy_path
- else
= link_to "Connect to Facebook", @fb_access_url