0

I use a fql request to find all my friends who use my application and want to see my film. I use this request :

FB.api({
    method: "fql.query",
    query: "SELECT actor_id FROM stream WHERE app_id = MYAPPID and source_id = "+friend.id+" and attachment.name = 'MYFILMNAME'"},
    function (responseFQL) {

This returns all friends ids. But i want to count the number of results, how can i do simply ? I can't use count(*) in FQL ?

Thanks !

Vinay
  • 6,891
  • 4
  • 32
  • 50
  • 2
    you well need to count after the query. for more details: http://stackoverflow.com/questions/3527518/how-can-i-count-the-total-friends-of-a-facebook-user-by-uid – elyashiv Jul 31 '12 at 11:15
  • Thanks, but i cant see a request which works to count my queries. I did that for the moment : SELECT friend_count FROM user WHERE uid IN (SELECT source_id FROM stream WHERE source_id = me() and app_id = "+APP_ID+" and attachment.name = 'FILM') But of course its not that i want... I want the number of my friends who saw the film with the application... its a hard request.. –  Jul 31 '12 at 15:38

1 Answers1

0

You can't use COUNT in FQL, it's not supported. Why don't you get the data and perform the count operation on your end ?

deesarus
  • 1,202
  • 8
  • 10
  • I want to show only count at some place. But data is required at next page. So i don't want to get data when only count is required. Can you give some suggestions how to get count ? – Gem Jul 17 '13 at 05:56