0.0
No commit activity in last 3 years
No release in over 3 years
Includes a configurable cache to keep your app from tipping over api limits.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.13
~> 2.4
>= 4, ~> 5.0
>= 6.0.0, ~> 6.0
 Project Readme

SocialRails

Ease the pain of integrating Facebook, Instagram and Twitter posts in a Rails app. Includes a configurable cache to keep your app from tipping over Facebook and Instagram api limits.

Installation

Gemfile

gem 'social_rails'

app/assets/javascripts/application.js

//= require social_rails/social-rails.js

config/routes.rb

mount SocialRails::Engine => '/social'

Configuration

Run rails g social_rails:config

Edit [Your project]/config/initializers/social_rails.rb

Each media options can be configured individually using SocialRails::[Media].configure method.

countdown #15.minutes by default
public: {
    post_count: # 1 by default
    max_characters: # 0 by default
    refresh: # false by default
    refresh_time: # 15.minutes.in_milliseconds by default
}

Utilisation

Pour utiliser la cache de Rails en developement:

  • cd to your project installation
  • run touch tmp/caching-dev.txt

Use the view helper:

<%= socialrails(:facebook [, options={}]) %>

Options must be an Hash of theses available options:

post_count # 1 by default
max_characters # 0 by default
refresh # false by default
refresh_time # 900000 (15 minutes) in milliseconds

Use the following generator command to override views.

rails g social_rails:views