Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 854387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:55:00+00:00 2026-05-15T07:55:00+00:00

i am getting the following url information and need to parse it within rails.

  • 0

i am getting the following url information and need to parse it within rails. i already checked request and params but it is not there.

the “#” character seems to f*ck up things.

here’s the url:

http://foo.bar.me/whoo#access_token=131268096888809%7C2.5BRBl_qt4xJ08n88ycbpZg__.3600.1276880400-100001151606930%7C0kJ1K-qoGBbDoGbLx6s4z5UEaxM.

thanks for any pointers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:55:00+00:00Added an answer on May 15, 2026 at 7:55 am

    You won’t be able to access the part after the ‘#’ character as the browser doesn’t send it to the server. You can use it on the client side with javascript though.

    It seems that you’re trying to use the javascript based authentication which is not what you really want.

    I didn’t have any problems using this oauth2 library. Then you only need to check for params[:code] within your callback action.

    UPDATE:

    This is a simplified version of the code I used in my experiments with the new facebook graph API:

    # Accessible as facebook_url:
    # routes.rb: map.facebook '/facebook', :controller => 'facebook', :action => 'index'
    def index
      oauth2 = OAuth2::Client.new(FB_API_KEY, FB_API_SECRET, :site => 'https://graph.facebook.com')
    
      if current_user.facebook_token
        # The user is already authenticated
        fb = OAuth2::AccessToken.new(oauth2, current_user.facebook_sid)
        result = JSON.parse(fb.get('/me'))
      elsif params[:code]
        # Here we get the access token from facebook
        fb = oauth2.web_server.get_access_token(params[:code], :redirect_uri => facebook_url)
        result = JSON.parse(fb.get('/me'))
        current_user.facebook_id = result["id"]
        current_user.facebook_token = fb.token.to_s
        current_user.save
      else
        # The user is visiting this page for the first time. We redirect him to facebook
        redirect_to oauth2.web_server.authorize_url(:redirect_uri => facebook_url, :scope => 'read_stream,publish_stream,offline_access')
      end
    end
    

    You don’t really need anything else for it to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sending request with URL length ~ 4950 characters. Getting the following XMLHTTPRequest.ResponseText: ERROR The
I am getting following error when i parse my XML org.apache.harmony.xml.ExpatParser$ParseException: At line 1,
I have the following url I need to support in my asp.net mvc project
I'm new to rails and getting the following error: NameError in FriendshipsController#create uninitialized constant
Am getting following error message on calling WCF service: The formatter threw an exception
I am getting following error when I am trying to get WebResponse using WebResponse
I am getting Following Exception while configuring the Connection Pool in Tomcat This is
I am getting following error message when using Doctrine ORM in Codeigniter. ( !
i am getting following memory leaks for webview initWebUILocalStorageSupport MobileQuickLookLibrary() and here is my
I am getting following error in different places like when I am removing an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.