Module: Platformx::InstagramHelpers
- Defined in:
- lib/platformx/template.rb,
lib/platformx/instagram.rb
Instance Method Summary collapse
-
#x_instagram_recent(access_token: "") ⇒ Object
Get Recent Feed ############################.
Instance Method Details
#x_instagram_recent(access_token: "") ⇒ Object
Get Recent Feed ############################
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/platformx/instagram.rb', line 25 def x_instagram_recent(access_token: "") @client = Instagram.client(access_token: access_token) user = @client.user @feed = [] for media_item in @client.user_recent_media item = { :thumb_url => media_item.images.thumbnail.url, :id => media_item.id, :likes => media_item.likes[:count] } @feed.push(item) end return @feed end |