0

here cover photos is public album.and acess token is valid. but response returns an empty array.

FB.api(


{
    method: 'fql.query',
    query: 'SELECT object_id FROM album WHERE owner = me() AND name="Cover Photos"',
    access_token: $scope.getCookie("access_token"),
     },
     function(response) 
{
     console.log(response);
}

);

Jinto VR
  • 3
  • 4

1 Answers1

0

According to the FB docs the query should work if you pass a valid Access Token and your album is public.

See https://developers.facebook.com/docs/reference/fql/album/#permissions

I tried this with my user, and the query itself seems fine. I think you have a problem in your JS code. The method parameter should be one of the following: GET, POST, DELETE according to https://developers.facebook.com/docs/javascript/reference/FB.api/ The method "fql.query" is deprecated. Use the Graph API endpoint /fql instead with method GET.

See the answer here to solve your problem: Using facebook javascript sdk to process fql query

Community
  • 1
  • 1
Tobi
  • 31,405
  • 8
  • 58
  • 90