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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:28:08+00:00 2026-06-11T19:28:08+00:00

I am new to Facebook API. Trying the FQL Query from the Graph API

  • 0

I am new to Facebook API. Trying the FQL Query from the Graph API for the first time using this link.

I am trying to get photos from the album with the album id. When I request using Facebook object with https://graph.facebook.com/10150146071791729/photos&access_token=ACCESS_TOKEN URL, I am getting the following response (before parsing to JSON object). {"id":"https://graph.facebook.com/10150146071791729/photos","shares":2}. And I confirmed it by printing the length of the JSON object after parsing, which is 2. When I copy and paste the same URL in the web browser, I am getting the expected response (the response in FQL Query I got). Here is my code.

public void onComplete(Bundle values) {
                    String token = facebook.getAccessToken();
                    System.out.println("Token: " + token);
                    try {
                        String response = facebook.request("https://graph.facebook.com/10150146071791729/photos&access_token=ACCESS_TOKEN");
                        System.out.println("response :"+response);
                        JSONObject obj = Util.parseJson(response);
                        System.out.println("obj length : " + obj.length());
                        Iterator iterator = obj.keys();
                        while(iterator.hasNext()){
                            String s = (String)iterator.next();
                            System.out.println(""+s+" : "+obj.getString(s));
                        }

                    } catch (Throwable e) {
                        e.printStackTrace();
                    }
                }

Note: I got access token from the FQL Query which is used in the URL. And I did not wrote any session (login/logout) logic as it is a test project.

  • 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-11T19:28:10+00:00Added an answer on June 11, 2026 at 7:28 pm

    Your request is wrong. It should be

    "https://graph.facebook.com/10150146071791729/photos?access_token=ACCESS_TOKEN"

    Replace the ‘&’ after the photos with a ‘?’.

    Two more things, you’re making a Graph API query, not an FQL one.

    Second, NEVER post your access tokens publicly. If I wanted to, I can now use your access token to edit your facebook information.

    EDIT: When you use the Android Facebook SDK, you do not need to use the full graph path. Instead, use

    facebook.request("10150146071791729/photos")

    You do not need to add the access token as the Facebook object already has it. Hope this helps.

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

Sidebar

Related Questions

I'm trying to use the new Facebook Graph API on my website. This is
I've been trying to get Rails to play with the new Facebook Graph API.
I'm trying to do the following Facebook Query Language query: https://api.facebook.com/method/fql.query?query=SELECT name FROM user
Hi i am new in using facebook api i want to get the friends
how to develop new facebook application (login , add photos ) using the api
I'm trying to familiarize myself with Facebook's new Graph API and so far I
I am using ruby-1.8.7-p302/Rails 2.3.11. I am trying to use FQL (Facebook API) to
I am trying to get some locations in New York using FourSquare API using
i get an error while trying to automatically post a link with Facebook Graph
I'm trying to setup a new facebook app using the example from Facebook but

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.