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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:14:21+00:00 2026-06-17T20:14:21+00:00

I am using the new facebook sdk in android to get the facebook albums.

  • 0

I am using the new facebook sdk in android to get the facebook albums.
The code I am using is,

Session session = Session.getActiveSession();
Request request = new Request(null,
"https://graph.facebook.com/me/albums?access_token=" + session.getAccessToken());
Response response = Request.executeAndWait(request)

When I do a https://graph.facebook.com/me/albums?access_token=ACCESSTOKEN I see the valid Json.

The request object is,

{Request:  session: {Session state:OPENED_TOKEN_UPDATED, token:
{AccessToken token:ACCESSTOKEN permissions:[photo_upload, publish_stream, video_upload, share_item, installed, user_photos, status_update, create_note, publish_actions]},  
 appId:281846961912565}, graphPath: https://graph.facebook.com/me/albums?
access_token=ACCESSTOKEN, graphObject: null, restMethod: null, httpMethod: GET, parameters: Bundle[{migration_bundle=fbsdk:20121026}]}

But when I do a Response response = Request.executeAndWait(request); I get

{Response:  responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 190, errorType: OAuthException, errorMessage: Malformed access token ACCESSTOKEN?format=json}, isFromCache:false}

Complete code is as follows:

private class FetchUserPhotos extends AsyncTask<String, Integer, Boolean> {

    private ProgressDialog pd = null;

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
        pd = ProgressDialog.show(MainActivity.this, "WWD",
                "Fetching photos..", true, true);
    }

    @Override
    protected Boolean doInBackground(String... params) {
        Session session = Session.getActiveSession();
        Request request = new Request(null,
                "https://graph.facebook.com/me/albums?access_token="
                        + session.getAccessToken());

        Response response = request.executeAndWait();
        return true;
    }
    @Override
    protected void onPostExecute(Boolean result) {
        pd.dismiss();
    }

}

Could any of you please tell me if there is something wrong in the way i am accessing it please?

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

    Found the answer to this issue.The correct code is

            Session session = Session.getActiveSession();
            Request request = new Request(session, "me/albums");
    
            Response response = request.executeAndWait();
    

    You don’t have to specify the entire link and the accesstoken.

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

Sidebar

Related Questions

I am using this code to download a profile picture (https://graph.facebook.com/19292868552/picture) from Facebook using
I am using the facebook android sdk to access the user's facebook albums and
I'm using Facebook's SDK for Android (latest version as of today). The code that
I am using the new Facebook SDK 3.0 that just released on Android. I
How do I like a page using the new Facebook iOS SDK? (http://github.com/facebook/facebook-ios-sdk) I'm
Using the beta 3.0 SDK on Android, I'm opening a Facebook Session with a
I have a lot of apps published using the FB android sdk github.com/facebook/facebook-android-sdk All
I am using new facebook sdk 3.0 to send app request and some data
I'm using Facebook SDK in my Android App. And I need to get all
I'm using facebook-android-sdk to post messages to my wall. The following request: Bundle params

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.