Class: Mingle::Facebook::Post
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Mingle::Facebook::Post
- Defined in:
- app/models/mingle/facebook/post.rb
Instance Method Summary collapse
- #author ⇒ Object
- #avatar ⇒ Object
-
#large_picture ⇒ Object
Large pictures are not directly provided through the Graph API Note: Not a documented Facebook feature and may potentially break in the future.
- #profile_image_url ⇒ Object
- #profile_url ⇒ Object
Instance Method Details
#author ⇒ Object
29 30 31 |
# File 'app/models/mingle/facebook/post.rb', line 29 def user_name end |
#avatar ⇒ Object
33 34 35 |
# File 'app/models/mingle/facebook/post.rb', line 33 def avatar profile_image_url end |
#large_picture ⇒ Object
Large pictures are not directly provided through the Graph API Note: Not a documented Facebook feature and may potentially break in the future
17 18 19 |
# File 'app/models/mingle/facebook/post.rb', line 17 def large_picture picture.gsub(/_(?:s|t)\.(jpg|jpeg|png|gif)$/, '_b.\1') if picture.present? end |
#profile_image_url ⇒ Object
25 26 27 |
# File 'app/models/mingle/facebook/post.rb', line 25 def profile_image_url "https://graph.facebook.com/#{user_id}/picture" if user_id.present? end |
#profile_url ⇒ Object
21 22 23 |
# File 'app/models/mingle/facebook/post.rb', line 21 def profile_url "https://www.facebook.com/#{user_id}" if user_id.present? end |