Module: FacebookWall
- Defined in:
- lib/facebook_wall/post.rb,
lib/facebook_wall/methods.rb,
lib/facebook_wall/version.rb,
lib/facebook_wall/factories/methods.rb,
lib/facebook_wall/feed_entry_filters/chain.rb,
lib/facebook_wall/feed_entry_filters/link_rewriter.rb,
lib/facebook_wall/feed_entry_filters/paragraphizer.rb,
lib/facebook_wall/feed_entry_filters/feed_entry_filter.rb
Defined Under Namespace
Modules: Factories, FeedEntryFilters Classes: Post
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
-
.feed_url(id) ⇒ Object
Returns the URL of the RSS feed for the specified Facebook page’s wall.
-
.posts_by(id) ⇒ Object
Returns the most recent posts from the specified Facebook page’s wall.
Class Method Details
.feed_url(id) ⇒ Object
Returns the URL of the RSS feed for the specified Facebook page’s wall.
Parameters
- id - Fixnum
-
The ID of the Facebook page
Returns
String
7 8 9 |
# File 'lib/facebook_wall/methods.rb', line 7 def self.feed_url(id) "http://www.facebook.com/feeds/page.php?id=#{id.to_s}&format=rss20" end |
.posts_by(id) ⇒ Object
Returns the most recent posts from the specified Facebook page’s wall.
Parameters
- id - Fixnum
-
The ID of the Facebook page
Returns
Array of FacebookWall::Post objects
16 17 18 19 20 |
# File 'lib/facebook_wall/methods.rb', line 16 def self.posts_by(id) feed = RSS::Parser.fetch_and_parse feed_url id feed_entry_filter_chain = Factories::create_feed_entry_filter_chain Factories::create_posts feed, feed_entry_filter_chain end |