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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:15:35+00:00 2026-06-12T13:15:35+00:00

$queries = ‘{query1:SELECT pid, src, link, caption, like_info, created FROM photo WHERE aid in

  • 0
$queries = '{"query1":"SELECT pid, src, link, caption, like_info, created FROM photo WHERE aid in ( SELECT aid FROM album WHERE owner = me() AND type = \"profile\" AND name = \"Profile Pictures\" ORDER BY created ASC LIMIT 1)","query2":"SELECT pid, src, link, caption, created, like_info FROM photo WHERE aid in ( SELECT aid FROM album WHERE owner = me() AND type = \"profile\" AND name = \"Profile Pictures\" ORDER BY created DESC LIMIT 1)"}';    
$multiquery = "https://api.facebook.com/method/fql.multiquery?queries=" . urlencode($queries) . "&format=json&" . $access_token;
$res = json_decode(file_get_contents($multiquery), TRUE);

But when execute a two single queries, it is working fine. What is the problem here?

I am just trying to fetch the first and the last profile photo

  • 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-12T13:15:36+00:00Added an answer on June 12, 2026 at 1:15 pm

    A few comments:

    The best way to do this is with the PHP SDK and not with file_get_contents.

    You are using the old REST API url, which is deprecated. You should be using the Graph API url: https://graph.facebook.com/fql?q=

    Does your $access_token variable include the &access_token= piece of the query string?

    Finally, to keep your queries straight, I’ve found the best way is to add these as elements of an array with the query name as the key, e.g.: $fql['query1'] = 'SELECT ...' and then use json_encode(preg_replace('/\s+/', ' ', $fql)) to combine them into error-free json.

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

Sidebar

Related Questions

I have the following queries, QryStockOnHand SELECT QrySaleTot.Item, QrySaleTot.ProductID, [QryStockLevel].[Stock]-[QrySaleTot].[Quantity] AS StockOnHand FROM QryStockLevel
These queries both give the result I expect: SELECT sex FROM ponies ORDER BY
I have queries that are similar to: -- MySQL Query SELECT * FROM table1
I have two seperate queries: SELECT `ad_general`.`id` FROM (`ad_general`) WHERE `ad_general`.`city` = '708' ORDER
my queries are : $select_userid_query = execute_pdo_query(SELECT user_id FROM users WHERE username=' . $_COOKIE['username']
Consider the 2 MySQL queries: SELECT ue.userid,e.courseid FROM (SELECT id,courseid FROM mdl_enrol WHERE status
I have the following queries: Select TRUNC(create_dtime) as Day, Count(Create_Dtime) As SinS_Tot From player_chkin_hist
Consider the following 2 queries: select tblA.a,tblA.b,tblA.c,tblA.d from tblA where tblA.a not in (select
The following two queries each give the same result: SELECT column FROM table GROUP
I am using two queries to select the values from their respective tables, and

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.