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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:11:30+00:00 2026-05-18T00:11:30+00:00

I am trying to get the access_token from facebook. First I redirect to facebook

  • 0

I am trying to get the access_token from facebook. First I redirect to facebook using an url as the following

https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=7316713919&redirect_uri=http://whomakescoffee.com:8080/app/welcome.jsf&scope=publish_stream

Then I have a listener that gets the url.

FacesContext fc = FacesContext.getCurrentInstance();
        HttpServletRequest request =
                (HttpServletRequest) fc.getExternalContext().getRequest();
String url = request.getRequestURL().toString();
                if (url.contains("access_token")) {
                    int indexOfEqualsSign = url.indexOf("=");
                    int indexOfAndSign = url.indexOf("&");
                    accessToken = url.substring(indexOfEqualsSign + 1, indexOfAndSign);
                    handleFacebookLogin(accessToken, fc);
                }

But it never gets inside the if..

How do I retrieve the parameter when it comes after a # instead of a usual parameter after ?.

The url looks something like

http://benbiddington.wordpress.com/#access_token=
    116122545078207|
    2.1vGZASUSFMHeMVgQ_9P60Q__.3600.1272535200-500880518|
    QXlU1XfJR1mMagHLPtaMjJzFZp4
  • 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-18T00:11:30+00:00Added an answer on May 18, 2026 at 12:11 am

    The URL is incorrectly encoded. It’s XML-escaped instead of URL-encoded. The # is a reserved character in URL’s which represents the client-side fragment which is never sent back to the server side.

    The URL should more look like this:

    https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=7316713919&redirect_uri=http%3a%2f%2fwhomakescoffee.com%3a8080%2fapp%2fwelcome.jsf%26scope%3dpublish_stream

    You can use java.net.URLEncoder for this.

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

Sidebar

Related Questions

im trying to test example from developers webpage $token_url = https://graph.facebook.com/oauth/access_token? . client_id= .
I am trying to process the following URL via the HttpGet() method: https://graph.facebook.com/search?q=Cafe++Bakery&type=event&access_token=&type=event&access_token=239090718395|lqqOnRWlcJOb3QGp3G4HW2aqhlc .
I am trying to loading a facebook feed from my webpage using: https://graph.facebook.com/177610425663218/feed For
I'm trying to get the education info from Facebook's graph API using stdclass. here's
I'm trying to understand how getting an access_token works with CURL. $url = https://api.com/oauth/access_token;
I am trying to get access token using from facebook graph API in my
I'm trying to get JSON data from facebook using the following code: var getFriends
I am currently trying to get all events from a facebook page using OpenGraph.
I got this error while trying to get facebook access_token from node.js server: {error:{message:(#803)
I've encountered several issues while trying to get Facebook's Graph API work in IE.

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.