Giter Club home page Giter Club logo

google-plus-api's Introduction

#Buffer to Google+ via casperjs/phantomjs

A nodejs script/daemon that will connect with Buffer API and post to google+ when new updates were submitted via buffer

##How does this work? If you've ever wondered why buffer does not share to google+, it's because google+ doesn't have an publicly available API.

Using Casper.js, the script opens google+ sharing page in a hidden(headless) browser, and posts the update received from buffer API.

##Requirenments

  • Node.js
  • Phantomjs
  • Casperjs

##Setup

  • Clone the repo
  • Make sure you have casperjs on your path - casperjs --version
  • Install npm requirenments - npm install
  • Obtain a buffer Access Token
  • Save example_config.json as config.json and edit it with your Access Token, Google+ Username and password.
  • In the service field, choose to which of your buffer accounts this script will listen. Can be one of twitter, facebook, linkedin
{
    "buffer_conf": {
        "service": "linkedin",
        "access_token": "BUFFER_ACCESS_TOKEN"
    },
    "google_conf": {
        "email": "YOUREMAILHERE",
        "password": "YOURPASSWORDHERE"
    }
}
  • This script requires your google username/password, but as it's running locally, it's not a HUGE security risk, just a mild one.

##Running the server

node app.js

##Installing as a service on mac osx

sudo node mac_daemon.js install

This will install the node server as a damon on your mac, that should work and reset itself on fails / restarts. This requires sudo priveleges.

After service is Installed, logs can be viewed in /Library/Logs/Buffer to Google+/buffertogoogle.log

To uninstall the server sudo node mac_daemon.js uninstall

##Why? This was done as a proof of concept. Getting Casperjs script to post to google was challenging and it was fun.

##Known Issues Because this is a hack, and google+ doesn't have a public API, some issues arrose.

  • Doesn't work if you have 2 step authentication enabled
  • Doesn't work on remote servers, I initially wanted this to run on heroku, can't be done
  • Has to run from any location google already seen you logging in

##Desclaimer WHile this code doesn't do anything harmful like saving your password (check for youself, it's all here), it doesn't stop someone from accessing your computer and reading the config.json. ###USE AT YOUR OWN RISK I'm not responsible for any damages that using this script may provide you.

google-plus-api's People

Contributors

altryne avatar fayland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

google-plus-api's Issues

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.