Question

$fql_multiquery_url = 'https://graph.facebook.com/' . 'fql?q={"query1":"SELECT+uid,sex,name,pic_square+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1=me())+AND+sex=\"'.$sex.'\"","query2":"SELECT+url+FROM+profile_pic+WHERE+id+IN+(SELECT+uid+FROM+#query1)"}' . '&access_token=' . $access_token;

This gives error failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request\r\n in /var/www/facebook-php-sdk-master/examples/fqlsample.php on line 82

but the below query works fine.

$fql_multiquery_url = 'https://graph.facebook.com/' . 'fql?q={"query1":"SELECT+uid,sex,name,pic_square+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1=me())+AND+sex=\"'.$sex.'\"","query2":"SELECT+url+FROM+profile_pic+WHERE+id+IN+(SELECT+uid2+FROM+friend+WHERE+uid1=me())"}' . '&access_token=' . $access_token;

the problem is in thhis part (SELECT+uid+FROM+#query1)

why the multi query fails to work.

any idea?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top