How to combine both api calls into one, for example, only 1 FB.api () call?
You could combine them into one Batch Request - but it will help to respond a little to the answer, and I'm not sure that in any case it will bring any "performance" benefits in such a simple use case.
EDIT:
¹, :
/me?fields=id,email,first_name,friends.fields(id,name)
- id, email first_name , . (, ,friends , , , API, , ,friends.fields(…).)
¹ , , , Id .