Count friends I send invitation by facebook

Hi, How can I count friends that I selected in my Facebook select friends function?

I mean, If I select 4 friends, make a function that count the 4 friends.

Thanks in advance!

It should return a JSON data string that when you do a json.decode() on the string, becomes a Lua table.  You can use the # operator to get the length of the table:

local friends = json.decode(event.response)

for i = 1, #friends do

     print("friend #’ … i, friends[i])

end

It should return a JSON data string that when you do a json.decode() on the string, becomes a Lua table.  You can use the # operator to get the length of the table:

local friends = json.decode(event.response)

for i = 1, #friends do

     print("friend #’ … i, friends[i])

end