DG IZ; user can post a status update from user edit page to facebook.
This commit is contained in:
parent
0c2480c9be
commit
fc0350e4e1
2 changed files with 22 additions and 18 deletions
|
|
@ -34,7 +34,7 @@ class ServicesController < ApplicationController
|
||||||
type = 'feed'
|
type = 'feed'
|
||||||
|
|
||||||
@res = MiniFB.post(@access_token, id, :type=>type, :metadata=>true, :params=>params)
|
@res = MiniFB.post(@access_token, id, :type=>type, :metadata=>true, :params=>params)
|
||||||
redirect_to user_edit_url current_user
|
redirect_to edit_user_url current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -57,23 +57,6 @@
|
||||||
%br
|
%br
|
||||||
|
|
||||||
|
|
||||||
%h2 Services
|
|
||||||
|
|
||||||
%h3 Facebook
|
|
||||||
%p
|
|
||||||
- if @logged_in
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
#submit_block
|
#submit_block
|
||||||
|
|
@ -81,6 +64,27 @@
|
||||||
or
|
or
|
||||||
= f.submit "Update Profile"
|
= f.submit "Update Profile"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%h2 Services
|
||||||
|
|
||||||
|
%h3 Facebook
|
||||||
|
%p
|
||||||
|
- if @logged_in
|
||||||
|
Connected to facebook as
|
||||||
|
- @response_hash = MiniFB.get(@access_token, 'me')
|
||||||
|
= @response_hash[:name]
|
||||||
|
|
||||||
|
|
||||||
|
- form_tag :controller => "services", :action => "fb_post" do
|
||||||
|
= 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
|
||||||
|
- end
|
||||||
|
|
||||||
#content_bottom
|
#content_bottom
|
||||||
.back
|
.back
|
||||||
= link_to "⇧ home", root_path
|
= link_to "⇧ home", root_path
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue