Git Product home page Git Product logo

socialshare's Introduction

Socialshare

Ruby interface to update status(text, image, video) on social networking sites(Facebook, Twitter, Linkedin).

Installation

Add this line to your application's Gemfile:

gem 'socialshare'

And then execute:

$ bundle

Or install it yourself as:

$ gem install socialshare

Usage

  1. for twitter

    s = Socialshare::Tweeter.new(:consumer_key => TWITTER_CONSUMER_KEY, :consumer_secret => TWITTER_CONSUMER_SECRET, :user_token => twitter_user_token, :user_secret => twitter_user_secret)

    s.post(text) #to tweet on twitter

    s.get_twitter_profile #to get your twitter profile

    s.user_timeline #to get your twitter timeline

    s.get_twitter_home_timeline #to get home twitter timeline

    s.update_profile_photo(YOUR_IMAGE_PATH) #update your twitter profile image

    s.update_profile_background_photo(YOUR_IMAGE_PATH) #update your twitter profile background image

    s.get_twitter_followers #to get your twitter followers

    s.fetch_tweet_by_id(tweet_id) #fetch any tweet using tweet id

    s.fetch_twitter_friends(:name => "abc") #fetch twitter friend by name

    s.fetch_twitter_friends(:id => "abc") #fetch twitter friend by id

    s.fetch_twitter_friends # get all friends

  2. for facebook

    s = Socialshare::Facebook.new(:fb_token => facebook_user_token)

    s.post(text) #to post on facebook

    s.get_facebook_profile #to get your facebook profile

    s.get_facebook_connections #to get your facebook connections

    s.share_picture(FILE_PATH) #to share image on facebook

    s.share_video(FILE_PATH) #to share video on facebook

  3. for Linkedin

    s = Socialshare::Linkdin.new(:api_key => LINKEDIN_API_KEY, :secret_key => LINKEDIN_SECRET_KEY, :user_token => twitter_user_token, :user_secret => twitter_user_secret)

    s.post(text) #to post on linkedin

    s.get_linkedin_profile #to get your linkedin profile

Contributing

  1. Fork it
  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 new Pull Request

socialshare's People

Contributors

pandurang90 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.