Facebook App Info

    <% @app_data.each_pair do |key, value| %>
  • <%= key %>: <%= value %>
  • <% end %>

Permissions

Reset Selection
Choose permissions for the OAuth URL and the fb:login button.
<% if @fetched_permissions %>
Showing currently-active permissions
(These were fetched by Koala as the page loaded!)
<% else %>
Showing selected permissions
<% end %>
<% @available_permissions.each do |permissions| %>

<%= permissions[:name] %> Permissions

    <% permissions[:perms].each do |p| %>
  • />
  • <% end %>
<% end %>

OAuth URLs

  • Generate a code: <%= @oauth.url_for_oauth_code(:permissions => @permissions) %>
  • OAuth code: <%= @code || "click on the link above" %>
  • Access token: <%= @oauth_access_token || "click on the link above" %> <% if @oauth_access_token %>
    This was fetched by Koala as the page loaded!
    <% end %>
  • Expiration: <%= @expiration || "click on the link above" %>
  • Raw access response: <%= @raw_access_response || "click on the link above" %>
  • URL for access code: <% if @code %> <%= @oauth.url_for_access_token(@code) %> <% else %> click on the link above <% end %>

Javascript Login (e.g. Facebook Connect)

"> <% if @permissions %> and prompt for <%= @permissions.join(", ") %> <% end %> <% if @facebook_cookies %>

<% end %>

Cookie info

    <% if @facebook_cookies %> <% @facebook_cookies.each_pair do |key, value| %>
  • <%= key %>: <%= value %>
  • <% end %> <% else %>
  • You're not signed in via Javascript. Login below.
  • <% end %>
  • Raw hash:
    <%= request.cookies.inspect %>

Koala

  • GraphAPI:
    <%= @access_token ? "@graph = Koala::Facebook::GraphAPI.new(\"#{@access_token}\")" : "sign in above" %>
  • OAuth:
    @oauth = Koala::Facebook::OAuth.new(<%= @app_data["app_id"] %>, "<%= @app_data["secret_key"] %>", "<%= @app_data["callback_url"] %>")
 
Check out the playground's code at http://github.com/arsduo/oauth_playground!