Newer
Older
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Daniel Vincent Grippi
a validé
before_filter :authenticate_user!
respond_to :html
respond_to :json, :only => :show
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
@status_message = current_user.find_visible_post_by_id params[:id]
respond_with :location => root_url
@status_message = current_user.find_visible_post_by_id params[:id]
respond_with @status_message
private
def clean_hash(params)
return {
:message => params[:message],
:to => params[:to]
}
end