Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

postwill

> DevOps
Open source

Posting to the most popular social media from Ruby

191 stars0 likes1 views
WebsiteGitHub

About

Posting to the most popular social media from Ruby

Postwill

Posting to the most popular social media

Installation

Add this line to your application's Gemfile:

ruby
gem 'postwill'

And then execute:

$ bundle

Or install it yourself as:

$ gem install postwill

Usage

List of available providers is here.

Single provider

ruby
postwill = Postwill::Client.new(
                   twitter: {
                     access_token: 'access_token',
                     access_token_secret: 'access_token_secret'
                   }
                 )

postwill.to(:twitter, text: 'text', image: 'image')

Success:

ruby
{
  twitter: {
    status: :ok,
    response: {} # Hash of response data depends on provider
  }
}

Failure:

ruby
{
  twitter: {
    status: :error,
    response: '' # String error message
  }
}

Application credentials

config/initializers/postwill.rb

ruby
Postwill::Settings.configure do |config|
  config.providers.twitter = {
    consumer_key: 'your_consumer_key',
    consumer_secret: 'your_consumer_secret'
  }
end

Multiple providers

ruby
postwill = Postwill::Client.new(
                   twitter: {
                     access_token: 'access_token',
                     access_token_secret: 'access_token_secret'
                   },
                   facebook: {
                     access_token: 'access_token'
                   }
                 )

postwill.to(%i[twitter facebook], text: 'text', image: 'image')

Result:

ruby
{
  twitter: {
    status: :ok,
    response: {} # Response data
  },
  facebook: {
    status: :ok,
    response: {} # Response data
  }
}

Application credentials(for providers which need them)

config/initializers/postwill.rb

ruby
Postwill::Settings.configure do |config|
  config.providers.twitter = {
    consumer_key: 'your_consumer_key',
    consumer_secret: 'your_consumer_secret'
  }
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/postwill/postwill.

License

The gem is available as open source under the terms of the MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyfacebookinstagrampinterestruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理