Class: FacebookAuthServer

Inherits:
TCPServer
  • Object
show all
Defined in:
lib/facebook_server.rb

Instance Method Summary collapse

Instance Method Details

#serve_and_extract_access_token_from_user_agent_flowObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/facebook_server.rb', line 2

def serve_and_extract_access_token_from_user_agent_flow
  serve_content_and_return_request(%Q{
    <script>
      window.location.replace(window.location.toString().replace('#', '?'));
    </script>})

  request = serve_content_and_return_request(%q{
    Success! You can now close this window and return to FacebookCL.
    <script>
      window.close();
    </script>})

  extract_access_token_from_request(request)
end