Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This gem adds a special link_to_social method to the Rails view helpers to easily make a regular link into a social sharing link.

If you're unsure of what this means, try clicking on of these example links:

Share link_to_social on LinkedIn

Share link_to_social on Facebook


Add the gem to your Rails project's Gemfile, then bundle install to get started.

gem 'link_to_social'

To use link_to_social inside your views:

link_to_social "Share Google on Facebook", "", network: :facebook

link_to_social "Share Google on Twitter", "", network: :twitter

Network options are passed as symbols. Acceptable network options include:


Some social networks also include optional parameters to include more information with your link, which have been added explicitly as options to link_to_social. Here are some examples:

link_to_social "Share Google on Twitter", "", network: :twitter, text: "Google is awesome."

link_to_social "Share Google on LinkedIn", "", network: :linkedin, title: "Great Pandas", source: ""

link_to_social("Share Google on Tumblr", "", network: :tumblr, name: "A great post.", source: ""

Contributing to link_to_social

Pull requests welcome.

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so we don't break it in a future version unintentionally.
  • Send in a pull request!

Credits alpha


Easily create sharing links in Rails for all of the major social networks using a simple link_to_social tag.




No releases published


No packages published
You can’t perform that action at this time.