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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:21:43+00:00 2026-05-31T20:21:43+00:00

I am creating a java application with RestFB. At this url, Facebook explains how

  • 0

I am creating a java application with RestFB.
At this url, Facebook explains how to authenticate using facebook connect.

Basically, the steps are the following:

  1. Redirect to facebook as the example.

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream

2.If I invoke a HTTP request using the above URL, I get the following html response.

3.But if I invoke the above link via my browser, I get the following url which contains the OAuth code.

What I really want is the OAuth code which I am able to obtain only through the browser 3, I am unable to get that code via 2. I would like to programatically fetch the OAuth code in my standalone java program. How do I achieve that?

  • 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-31T20:21:44+00:00Added an answer on May 31, 2026 at 8:21 pm

    You cannot obtain the OAuth code programmatically. This codes lets you perform actions on behalf of the user you are getting permission from.

    When you redirect the browser to the URL at step 1, the browser renders a dialog where the user presses Allow or Skip. Only if the user allows and gives permission to your app, then you are given an OAuth code.

    The response you get at 2 is perhaps the HTML of the screen you see on 3.

    Furthermore; restFB has nothing to do with authentication. It becomes useful after you obtain the access key.

    Last but not least, you might want to look into the Desktop Applications part of documentation.

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

Sidebar

Related Questions

I am creating a Java EE application using jpa. I am getting the following
I need some advice on creating a syntax highligher for java application using swing.
This is a standalone java application. I am using the configuration file below and
I am creating a Java application which performs URL search for site: http://www.alexa.com/topsites/category User
I am creating a Java Application using netBeans and Swing Gui Builder. I am
I'm creating a Java application in NetBeans, and I have the following code that
I'm creating a dialog as part of Java application. I'm using groovy's swingBuilder and
I am creating a Java application where I am using log4j. I have given
I am creating a Java ME application to connect to server. My problem in
I am creating breakpoints to debug my java application , and am using netbeans

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.