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 8456175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:28:47+00:00 2026-06-10T12:28:47+00:00

Hi I am doing facebook login feature in my application. Now problem is that,

  • 0

Hi I am doing facebook login feature in my application. Now problem is that, when I logged in from facebook account, I am redirected to my specified redirected url with access token. I need to grab this access token in managed bean. My redirected url is like that :
localhost:8080/XXXXXX/myholiday.xhtml#access_token=AAAGHUgDJZCg0BAG2I8o

I have tried:

          HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();


    String url = request.getRequestURL().toString();

    System.out.println(url);


    System.out.println( FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("access_token"));


    // Getting request information without the hostname.

    String uri = request.getRequestURI();
    System.out.println(uri);

Output is the following :
localhost:8080/xxxxxxx/myholiday.xhtml

null

xxxxxxx/myholiday.xhtml

can anyone please help me to grab the access token?

  • 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-06-10T12:28:48+00:00Added an answer on June 10, 2026 at 12:28 pm

    You can not get the access token if it is passed in the hash part of the URL, because the hash part does not get transmitted to the server.

    You haven’t shown us, how exactly you call the Auth dialog – but it has a parameter response_type that can be set to code or token. codeshould be the default – if you have it set to token, change that.

    (Or, if your login gets triggered by Authenticated Referrals, set the Auth Token Parameter setting in your app settings to Query String.)

    Then follow the Server-Side Authentication flow from there.

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

Sidebar

Related Questions

Simple thing I'm doing is connecting to retrieving user's name from Facebook and passing
The Facebook connect code is eluding me a bit. I have no problem doing
I'm doing a login system with facebook, based on AJAX, and I'm having a
So this is what I'm doing- I am using facebook login for my site
I am doing login using facebook section of my iphone app. I want to
I am doing a reader application which can send text to Facebook. But I
Facebook document that you need to do the following for canvas login Include facebook
Assuming it is possible to transfer the Facebook API access token from some web
I am doing an application which include a userlogin,only the user login then only
I am developing an application which on login page also supports facebook login with

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.