added a warning, moved connected as into a partial, removed the
publishing box from settings page
This commit is contained in:
parent
d41b370630
commit
52313b799b
3 changed files with 10 additions and 9 deletions
|
|
@ -66,4 +66,9 @@ module ApplicationHelper
|
|||
def post_yield_tag(post)
|
||||
(':' + post.id.to_s).to_sym
|
||||
end
|
||||
|
||||
def connected_fb_as token
|
||||
response_hash = MiniFB.get(token, 'me')
|
||||
"Connected to facebook as #{response_hash[:name]}"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
%p
|
||||
%label{:for => "status_message_message"} Message
|
||||
= f.text_area :message, :rows => 2, :value => params[:prefill]
|
||||
= "going to Facebook as #{MiniFB.get(@access_token, 'me')[:name]}" if @logged_in && @aspect == :public
|
||||
= connected_fb_as(@access_token) if @logged_in && @aspect == :public
|
||||
= f.hidden_field( :public, :value => (params[:action] == 'public') )
|
||||
|
||||
%ul.aspect_selector{ :style => "display:none;"}
|
||||
|
|
|
|||
|
|
@ -8,20 +8,16 @@
|
|||
%h3 Facebook
|
||||
%p
|
||||
- if @logged_in
|
||||
Connected to facebook as
|
||||
- @response_hash = MiniFB.get(@access_token, 'me')
|
||||
= @response_hash[:name]
|
||||
= connected_fb_as(@access_token)
|
||||
|
||||
%p
|
||||
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
|
||||
- @fb_friends[:data].each do |friend|
|
||||
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
|
||||
|
||||
- form_tag "/services/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
|
||||
= link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url
|
||||
|
||||
#content_bottom
|
||||
.back
|
||||
|
|
|
|||
Loading…
Reference in a new issue