Skip to content

Commit

Permalink
testing whether it's the login
Browse files Browse the repository at this point in the history
  • Loading branch information
evantravers committed Mar 2, 2012
1 parent 2f2e920 commit f40909d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,17 @@
post '/' do
@post_id = params[:id]
@request = "https://graph.facebook.com/#{@post_id}/comments?access_token=#{session[:access_token]}"
puts "time to go to #{@request} town"
@json = JSON.parse HTTParty.get(@request).response.body
puts "request made"
@messages = []
# while there is data
until @json['data'].empty?
puts "not empty"
@json['data'].each do | comment |
puts "found message #{comment['message']}"
@messages << comment['message']
end
# follow the paging link
@request = @json['paging']['next']
puts "time to go to #{@request} town"
@json = JSON.parse HTTParty.get(@request).response.body
end
puts "!!! got out of request land"
haml :success
end

Expand Down
2 changes: 0 additions & 2 deletions views/success.haml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@
%h2 AGAIN!
.row
.footer
- if loggedin?
%a{href: '/logout'} log out

0 comments on commit f40909d

Please sign in to comment.