Social networking giant Facebook has sued an Ontario-based company associated with online porn, alleging that it tried to hack into its system and access the personal information of users.