You see, the point here is whether you have set a valid session key for facebookService1 object before calling this line. Perhaps NO.
This method returns the list of all of your logged in friends. Now this method has basically three overloads, let's talk about the first one. The first overload doesn't take any input argument and thus it is assumed that the friends list will be returned
against current logged in user. How does facebookService1 will identify current logged in user? On the basis of ession, so if you are to use the first overload, with no input arguments, you need to set session key first, soemthing like
facebookService1.sessionKey = "Key Here"; //You will get this key by studying about session
The other overload takes one input argument, and that is userId against whom you wnat to obtain the list of friends. Say you want to get the list of friends for a user 233423232, then you will call this method as following,
List<facebook.schema.user> soemething = facebookService1.friends.getUserObjects(233423232);
and only public schema information will be returned for this user.
I would suggest you to study about session and security thing. That is, why few methhods are public and few are private (require active session)