diff --git a/app/models/fb_status.rb b/app/models/fb_status.rb index d1a57ef9a..367549c1b 100644 --- a/app/models/fb_status.rb +++ b/app/models/fb_status.rb @@ -18,7 +18,8 @@ class FbStatus def self.from_api(json) hash = JSON.parse(json) - self.create( + #just keeping them in memory for now + self.new( :graph_id => hash['id'], :author_id => hash['from']['id'] :author_name => hash['from']['name'], diff --git a/app/views/aspects/public.html.haml b/app/views/aspects/public.html.haml index def45bc7c..b760c9215 100644 --- a/app/views/aspects/public.html.haml +++ b/app/views/aspects/public.html.haml @@ -18,6 +18,11 @@ %ul#stream - for post in @posts = render type_partial(post), :post => post unless post.class == Album + - if @logged_in + - MiniFB.get(@access_token, 'me', :type => "feed").each do |item| + - if item['type'] == 'status' + = render "fb_status", :post => FbStatus.from_api() + #pagination = will_paginate @posts diff --git a/app/views/fb_status/_fb_status.html.haml b/app/views/fb_status/_fb_status.html.haml new file mode 100644 index 000000000..30ec62652 --- /dev/null +++ b/app/views/fb_status/_fb_status.html.haml @@ -0,0 +1,13 @@ +-# Copyright (c) 2010, Diaspora Inc. This file is +-# licensed under the Affero General Public License version 3. See +-# the COPYRIGHT file. + + +%li.message{:id => post.id, :class => ("mine" if current_user.owns?(post))} + + = image_tag( "http://graph.facebook.com/#{post.author_id}/picture" ) + + .content + %span.from + = post.author_name + = post.message