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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:51:13+00:00 2026-06-13T20:51:13+00:00

I am trying to access user information from facebook sdk.But I keep getting this

  • 0

I am trying to access user information from facebook sdk.But I keep getting this error.

{"error":{"message":"Error validating access token: The session has been invalidated because the user has changed the password.","type":"OAuthException","code":190,"error_subcode":460}}

Here is the call which returns me the error in the response parameter of the oncomplete function.

mAsyncRunner.request("me", new RequestListener() {
        @Override
        public void onComplete(String response, Object state) {
            Log.d("Profile", response);
            String json = response;    //<-- error in response
            try {

                JSONObject profile = new JSONObject(json);
                MainActivity.this.userid   = profile.getString("id");
                new GetUserProfilePic().execute();
                runOnUiThread(new Runnable() {

                    @Override
                    public void run() {
                        Toast.makeText(getApplicationContext(), "Name: " + MainActivity.this.userid, Toast.LENGTH_LONG).show();
                    }

                });

            } catch (JSONException e) {
                e.printStackTrace();
                Log.e("jsonexception",e.getMessage());
                facebook.extendAccessTokenIfNeeded(MainActivity.this, null);
                GetUserInfo();
            }
        }
        @Override
        public void onIOException(IOException e, Object state) {
        }

        @Override
        public void onFileNotFoundException(FileNotFoundException e,
                Object state) {
        }

        @Override
        public void onMalformedURLException(MalformedURLException e,
                Object state) {
        }

        @Override
        public void onFacebookError(FacebookError e, Object state) {
        }
});

Sometimes I get the correct response also.I think this is due to the access token expiration if I am right.
So can you guys tell me how to extend the access token although I’ve used this facebook.extendAccessTokenIfNeeded(this, null); in the onResume method of the activity.

How to solve this?

  • 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-13T20:51:14+00:00Added an answer on June 13, 2026 at 8:51 pm

    Both the extendAccessTokenIfNeeded and extendAccessTokenIfNeeded methods require the native Facebook app to be installed locally.

    (I don’t know if you are using v2 or v3b of the SDK, but it’s documented here https://developers.facebook.com/docs/reference/android/3.0/Facebook#extendAccessToken(Context,%20ServiceListener) )

    The behavior you’re seeing… is it in the emulator or a real device? If the former, you can install the native Facebook app as an APK from v3b of the SDK, available here: https://developers.facebook.com/android

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

Sidebar

Related Questions

I'm trying to request this kind of URL in iPhone 4.0 SDK (access token
I'm trying to get access to the user agent with Flask, but I either
I'm trying to access the video feed for a particular user account. This user
I am trying to do this tutorial https://developers.facebook.com/docs/howtos/login/getting-started/ I have done everything necessary(I think)
I'm trying to access basic information from a FRIEND page via FQL: SELECT name,
I'd like to get access to the public information about any user on Facebook.
Generating an image from a workflow, i'm getting this error.. The type initializer for
So I'm trying to use $.JSON to grab and access the data from this
I am trying to find a good pattern to use for user access validation.
Is it best to check for a null User when trying to access UserID

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.