A lawsuit alleges Facebook used its apps to gather info on users and their friends.