DG IZ; quick form in user edit
This commit is contained in:
parent
ae58120deb
commit
bc70ebdb95
2 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue