Git Product home page Git Product logo

simple-ruby-facebook-example's Introduction

This is just a simple example for connecting to facebook with OAUTH2. With this you can do all the reading and writing stuff to facebook. See the Koala Docs for more.

GETTING STARTED

  1. Clone the repository
  2. Run bundle inside the folder
  3. Change APP_ID, APP_SECRET (get this from facebook by registering an app)
  4. Add an URL like local.myapp.com pointing to 127.0.0.1 in your /etc/hosts file
  5. Add local.myapp.com to your App Domains list on facebook
  6. Set a long and random string as cookie secret (Line: 12)
  7. Start your Server with $ shotgun
  8. point your browser to http://local.myapp.com:9393/ and click login

DOING MORE

At this point you can make calls to the Facebook API (there are some examples in the comment): https://github.com/benben/simple-ruby-facebook-example/blob/master/lib/simple-ruby-facebook-example.rb#L17-L23

From that on, its better to read the Koala documentation, use the Graph Explorer from Facebook and read the Facebook API Documentation to get an idea what you can do after the authentication.

KUDOS

Made with the help of this two awesome gems:

LICENSE

THE BEER-WARE LICENSE

ben [at] nerdlabor [dot] de wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Benjamin Knofe http://benjaminknofe.com

simple-ruby-facebook-example's People

Contributors

benben avatar

Watchers

 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.