How would you do that? You can only do lookalike of an audience you upload yourself (ex: your customer list). How would you do a lookalike of your competitor?
You can target by purchasing history either through "Partner Categories", or "Purchase behavior". Facebook knows what anyone is (interested in) buying through pixel or aforementioned widgets.
Yeah but you cannot target specifically a competitor's customers just by the fact that they have a like button on their site, which is what OP was mentioning.
I don't think he meant a specific competitor rather than a whole category. Aka you buy a shirt at one site and then every e-commerce site that sells shirts can target you.
The data from the Facebook javascript integration is much richer as it lets Facebook see each customer's complete journey before purchase. This helps tremendously with ad targeting as it tells FB (for example) what other products the customer viewed before purchasing, and possibly even how they got to the site in the first place.