Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Gems
  3. social_shares

social_shares

MITRuby

A Ruby gem to fetch social media share counts for URLs across multiple networks including Facebook, Reddit, and LinkedIn.

GitHubGitHub
328 stars37 forks0 contributors

What is social_shares?

Social Shares is a Ruby library that provides an easy way to check how many times a URL has been shared across various social networks. It solves the problem of tracking content popularity and social engagement by fetching share counts from multiple platforms through a simple API.

Target Audience

Ruby developers building applications that need to track social media engagement, such as content management systems, analytics dashboards, or landing pages with social mechanics.

Value Proposition

Developers choose Social Shares for its multi-network support, flexible querying methods, and configurable error handling, offering a lightweight and extensible solution without unnecessary dependencies.

Overview

Check how many times url was shared in social networks, e.g. share counts

Use Cases

Best For

  • Tracking social share counts for content pages in Ruby applications.
  • Analyzing social engagement and popularity of URLs across international and regional networks.
  • Implementing social mechanics on landing pages that display share statistics.
  • Aggregating total share counts across selected social networks.
  • Adding custom social network providers to an existing share tracking system.
  • Handling API timeouts and errors gracefully in social share data fetching.

Not Ideal For

  • Projects requiring reliable Twitter share counts, as the API is deprecated and support is unreliable.
  • Non-Ruby applications, since this is a Ruby-specific gem with no cross-language bindings or alternatives.
  • High-traffic analytics platforms needing efficient caching or batch processing, due to direct API calls and no built-in optimization.
  • Teams seeking comprehensive social metrics beyond share counts, such as engagement rates, likes, or comments.

Pros & Cons

Pros

Extensive Network Support

Covers international networks like Facebook and Reddit, plus regional ones such as VKontakte and Weibo, as listed in the Supported networks section of the README.

Flexible Querying Methods

Provides methods like `all`, `selected`, and `omit` to retrieve counts from specific networks, with examples in the Advanced usage section for tailored data fetching.

Robust Error Handling

Includes safe methods returning `nil` on errors and bang methods raising exceptions, demonstrated in the Basic usage examples for graceful fallbacks.

Configurable Performance Settings

Allows setting `timeout` and `open_timeout` per network to handle slow responses, detailed in the Configuring section for reliability.

Easy Extensibility

New providers can be added by creating simple Ruby classes, as outlined in the Contributing guide, making it adaptable to emerging networks.

Cons

Deprecated Twitter Integration

The README admits Twitter's API is closed, making share counts for Twitter unreliable or unavailable, which is a significant gap for many projects.

External API Dependencies

Relies on third-party APIs that can change or fail, with no mention of fallback strategies, rate limit handling, or stability guarantees in the documentation.

No Built-in Caching

Fetches data directly each time, which could lead to performance bottlenecks and increased API usage for frequent queries, especially in high-volume applications.

Frequently Asked Questions

Quick Stats

Stars328
Forks37
Contributors0
Open Issues3
Last commit8 years ago
CreatedSince 2014

Tags

#social-media#ruby-gem#api-client#social-networks#analytics

Built With

R
Ruby

Included in

Ruby14.1kGems2.8k
Auto-fetched 10 hours ago

Related Projects

discoursediscourse

A platform for community discussion. Free, open, simple.

Stars47,796
Forks9,014
Last commit10 hours ago
diasporadiaspora

A privacy-aware, distributed, open source social network.

Stars13,652
Forks2,864
Last commit1 month ago
PaperTrailPaperTrail

Track changes to your rails models

Stars7,028
Forks907
Last commit4 months ago
FriendlyIdFriendlyId

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

Stars6,225
Forks591
Last commit21 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub