lib/facegroup/fb_api.rb in facegroup-0.4.0 vs lib/facegroup/fb_api.rb in facegroup-0.5.0
- old
+ new
@@ -53,9 +53,17 @@
access_token: access_token }
)
JSON.load(response.to_s)
end
+ def self.newest_group_postings(group_id)
+ feed_response = HTTP.get(
+ fb_resource_url(group_id) + '/feed',
+ params: { access_token: access_token }
+ )
+ JSON.parse(feed_response)['data']
+ end
+
private_class_method
def self.fb_resource_url(id)
URI.join(FB_API_URL, id.to_s).to_s
end