DG IZ; user can post a status update from user edit page to facebook.

This commit is contained in:
danielvincent 2010-09-22 17:49:11 -07:00
parent 0c2480c9be
commit fc0350e4e1
2 changed files with 22 additions and 18 deletions

View file

@ -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

View file

@ -57,6 +57,15 @@
%br %br
#submit_block
= link_to "Cancel", root_path
or
= f.submit "Update Profile"
%h2 Services %h2 Services
%h3 Facebook %h3 Facebook
@ -67,19 +76,14 @@
= @response_hash[:name] = @response_hash[:name]
- form_tag :controller => "services", :action => "fb_post" - form_tag :controller => "services", :action => "fb_post" do
= text_area_tag "message" = text_area_tag "message"
= submit_tag "send it off" = submit_tag "send it off"
= link_to "Disconnect from Facebook", services_destroy_path = link_to "Disconnect from Facebook", services_destroy_path
- else - else
= link_to "Connect to Facebook", @fb_access_url = link_to "Connect to Facebook", @fb_access_url
- end
#submit_block
= link_to "Cancel", root_path
or
= f.submit "Update Profile"
#content_bottom #content_bottom
.back .back