Skip to content

Instantly share code, notes, and snippets.

@tylr
Created May 26, 2012 08:08
Show Gist options
  • Save tylr/2792865 to your computer and use it in GitHub Desktop.
Save tylr/2792865 to your computer and use it in GitHub Desktop.
require '../pidgin/lib/pidgin/dialect'
dialect :facebook do
# Filter invoked as soon as it's mounted
mount do |credentials|
end
# Filter should return boolean in response to determine
# if we really have access
authenticate do
@session.authorized
end
# If the dialect does not respond via a responds_to
# handle it here. Could be used for dynamic responders
default do |path|
end
responds_to '/Liked' do
# ... #
end
responds_to '/Photos/Tagged' do
# ... #
end
responds_to '/Photos/Tagged/With/Me/In It' do
# ... #
end
responds_to '/Blah/Me/Fucking/shit/apple.txt' do
# ... #
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment