xwmx / facebooker2 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mmangino/facebooker2
A simple facebook connect library for ruby
License: MIT License
This project forked from mmangino/facebooker2
A simple facebook connect library for ruby
License: MIT License
Facebooker2 =========== Provides rails helpers for interfacing with Facebook's OpenGraph Javascript API, http://developers.facebook.com/docs/reference/javascript/. Requires the mogli gem. Example ======= 0. Prerequisite: You need a facebook app. Have your API Key, Application Secret, and Application ID handy. 1. Install facebooker2 as a plugin in your rails app. 2. Create config/facebooker.yml with the appropriate environment. production: app_id: <your application id> secret: <your application secret> api_key: <your application key> 3. Create config/initializers/facebooker2.rb and place the following line in it Facebooker2.load_facebooker_yaml 4. Add the following line to your app/controllers/application_controller.rb include Facebooker2::Rails::Controller 5. Update your rails applications to use the rails helpers. This could be in a shared login partial. <%= fb_connect_async_js %> <% if current_facebook_user %> <%= "Welcome #{current_facebook_user.first_name} #{current_facebook_user.last_name}!" %> or <%= "Hello #{fb_name(current_facebook_user, :useyou => false)}!" # link to facebook profile %> <%= fb_logout_link("Logout of fb", request.url) %><br /> <% else # you must explicitly request permissions for facebook user fields. # here we instruct facebook to ask the user for permission for our website # to access the user's facebook email and birthday %> <%= fb_login_and_redirect('<your URL here>', :perms => 'email,user_birthday') %> <% end %> Copyright (c) 2010 Mike Mangino, released under the MIT license
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.