IZ tying the publisher to fb in public aspect
This commit is contained in:
parent
fc2cf4fde6
commit
be10681945
4 changed files with 22 additions and 3 deletions
|
|
@ -14,6 +14,16 @@ class StatusMessagesController < ApplicationController
|
|||
|
||||
data = clean_hash params[:status_message]
|
||||
|
||||
if @logged_in && params[:status_message][:to] == :public
|
||||
id = 'me'
|
||||
type = 'feed'
|
||||
|
||||
@res = MiniFB.post(@access_token, id, :type=>type,
|
||||
:metadata=>true, :params=>{:message => params[:status_message][:message]})
|
||||
|
||||
params[:status_message][:to] == :all
|
||||
end
|
||||
|
||||
@status_message = current_user.post(:status_message, data)
|
||||
respond_with @status_message
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@
|
|||
= render "shared/aspect_friends"
|
||||
|
||||
- content_for :publish do
|
||||
- if @logged_in
|
||||
= render "shared/publisher", :aspect_ids => :public
|
||||
- else
|
||||
= render "shared/publisher", :aspect_ids => :all
|
||||
|
||||
%h3 Facebook
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
= link_to "All Aspects", root_url
|
||||
|
||||
%ul{ :style => "position:absolute;right:0;bottom:0.01em;"}
|
||||
%li{:class => ("selected" if @aspect == :all)}
|
||||
%li{:class => ("selected" if @aspect == :public)}
|
||||
= link_to "Public", aspects_public_path
|
||||
|
||||
%li{ :style => "margin-right:0;", :class => ("selected" if @aspect == :manage)}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,13 @@
|
|||
going to...
|
||||
- for aspect in @aspects
|
||||
%li
|
||||
= check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) )
|
||||
= check_box_tag("aspect_ids[]", aspect.id, @aspect == :public || @aspect == :all || current_aspect?(aspect) )
|
||||
= aspect.name
|
||||
|
||||
= f.submit "Share"
|
||||
|
||||
- if @logged_in
|
||||
- @response_hash = MiniFB.get(@access_token, 'me')
|
||||
= "going to Facebook as #{@response_hash[:name]}"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue