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

  • Home
  • SEARCH
  • 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 8118409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:28:51+00:00 2026-06-06T04:28:51+00:00

Hi 2 all guys i make all like in tutorial. But i have stopped

  • 0

Hi 2 all guys i make all like in tutorial. But i have stopped on getting access_Token. So this is my code that redirect to facebook.

@RequestMapping(method = RequestMethod.GET)
public void process(/*
                     * @ModelAttribute("user") User user, BindingResult
                     * result Model model,
                     */HttpServletRequest request, HttpServletResponse response) {
    FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory("240362226072898", "657532dea6d091ab44a56668c47cca15");
    OAuth2Operations oauthOperations = connectionFactory.getOAuthOperations();
    OAuth2Parameters params = new OAuth2Parameters("http://localhost:8080/shop/facebook");
    String authorizeUrl = oauthOperations.buildAuthorizeUrl(GrantType.IMPLICIT_GRANT, params);

    try {
        response.sendRedirect(authorizeUrl);
        LOG.error("ALL WORKING FINE>>>");
    } catch (IOException e) {
        LOG.error("Errorrrrr" + e);
    }

After that in other controller. which mapped on /facebook i recieve an URL but there i can not find any parametrs cause at the end of the url i see #. like

http://localhost:8080/shop/facebook#access_token=.......&expires_in=6277

if i cut “#” and paste “?” there everything will be fine

so this is my controller where i recieve this url.

@Controller
@RequestMapping(value = "/facebook")
public class FacebookController {
    private static final Logger LOG = Logger.getLogger(FacebookController.class);

    @RequestMapping(method = RequestMethod.GET) 
    public void getAuthorisation(@RequestParam String access_token, HttpServletResponse response, HttpServletRequest request) {

        LOG.error("Access token"+access_token);
/*      LOG.error(request.getAttribute("access_token"));
        LOG.error(request.getParameter("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-06T04:28:53+00:00Added an answer on June 6, 2026 at 4:28 am

    Extract the access token from the URI fragment using Javascript.

    See the documentation for client side flow:

    If the user chooses to authorize your application, the user will be
    redirected to:

    YOUR_REDIRECT_URI#access_token=USER_ACCESS_TOKEN&expires_in=NUMBER_OF_SECONDS_UNTIL_TOKEN_EXPIRES

    Note that unlike the
    server-side flow, the access token is passed to your redirect_uri in
    the url fragment and so is only available to your application through
    Javascript.

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

Sidebar

Related Questions

Hay guys, i want to use something like this users = User.objects.all() but i
The title explains all... I have this snippet of code in my application: String
I would really like to make this question very clear for all of us.
Hi guys first of all I have no expirience with DB programing only basic
hello guys I am trying to extract all the anchor links from aol but
Right guys, all autocomplete plugins and functions that I've found, they only update upon
Okay guys, I have read through all the other posts and question on jQuery
Would like to know from all you guys what do you think about my
I would like to select all jquery UI button that live inside all <div>
I have my HTML like this: <table> <caption class=my_caption>Table 1.1: TABLE CAPTION</caption> <tr>...</tr> <tr>...</tr>

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.