Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

social_share

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

social_share

  • 0.2.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SocialShare

Easy helper methods for adding custom social share buttons (Facebook, Twitter, and Google+) to your Rails app.

Installation

Add this line to your application's Gemfile:

gem 'social_share'

And then execute:

$ bundle

Or install it yourself as:

$ gem install social_share

Usage

in application.js

//= require 'social_share'

in application.css

*= require social_share

The current social service options are [:facebook, :twitter, :google_plus, :pinterest, :reddit, :tumblr, :stumbleupon]

The social_share method takes a title, a url, and an optional services argument (defaults to Facebook and Twitter) as well as an optional more_services option (defaults to everything except Facebook and Twitter).

<%= social_share(@video.title, video_path(@video), services: [:facebook, :twitter, :google_plus]) %>

Gotchas

The Pinterest button will only be generated if you include the optional image argument:

<%= social_share(@video.title, video_path(@video), image: 'https://placekitten.com/g/500/300') %>

Contributing

  1. Fork it ( https://github.com/ldewald/social_share/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

FAQs

Package last updated on 09 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc