Commit fe1ed9e6ae0352af5f8debc3ea5e0220c355bf5b
1 parent
20f1efe5
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
fixed most recent post time
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
plugins/community_hub/facebook_stream/codfish_facebook_api.rb
@@ -41,7 +41,7 @@ while true | @@ -41,7 +41,7 @@ while true | ||
41 | message += i['message'] | 41 | message += i['message'] |
42 | end | 42 | end |
43 | if not_blank(message) | 43 | if not_blank(message) |
44 | - if mostRecent == "" or mostRecent > i["updated_time"] | 44 | + if mostRecent == "" or mostRecent < i["updated_time"] |
45 | mostRecent = i["updated_time"] | 45 | mostRecent = i["updated_time"] |
46 | end | 46 | end |
47 | 47 |
plugins/community_hub/facebook_stream/facebook_stream.rb
@@ -5,6 +5,7 @@ require 'json' | @@ -5,6 +5,7 @@ require 'json' | ||
5 | #Aviso 12/04/2014 | 5 | #Aviso 12/04/2014 |
6 | #token que só deverá expirar em 59 dias | 6 | #token que só deverá expirar em 59 dias |
7 | @graph = Koala::Facebook::API.new('CAAD8cd4tMVkBAO3sh2DrzwZCDfeQq9ZAvTz7Jz24ZC26KtMfBoljqaXhD2vBV1zpP0bjrpxXUBzJvKKcFzOm6rMG9Sok7iNVUaxt5iwr7dfMqCvHpMboKpqrqgeLrfCH5ITVTAdezA6ZBSr9iOJrqyCSOYfui0zTmbXJ3FqtshwNRrRy4NPH') | 7 | @graph = Koala::Facebook::API.new('CAAD8cd4tMVkBAO3sh2DrzwZCDfeQq9ZAvTz7Jz24ZC26KtMfBoljqaXhD2vBV1zpP0bjrpxXUBzJvKKcFzOm6rMG9Sok7iNVUaxt5iwr7dfMqCvHpMboKpqrqgeLrfCH5ITVTAdezA6ZBSr9iOJrqyCSOYfui0zTmbXJ3FqtshwNRrRy4NPH') |
8 | +# https://graph.facebook.com/v1.0/search?q=%23dilma&type=post&access_token=CAAD8cd4tMVkBAO3sh2DrzwZCDfeQq9ZAvTz7Jz24ZC26KtMfBoljqaXhD2vBV1zpP0bjrpxXUBzJvKKcFzOm6rMG9Sok7iNVUaxt5iwr7dfMqCvHpMboKpqrqgeLrfCH5ITVTAdezA6ZBSr9iOJrqyCSOYfui0zTmbXJ3FqtshwNRrRy4NPH | ||
8 | 9 | ||
9 | #feed = @graph.get_connections("participabr", "posts") | 10 | #feed = @graph.get_connections("participabr", "posts") |
10 | 11 |