Grouping company information
You can consider string similarity based on edit distance. eg: Levenshtein distance

However, you also need to compute this with respect to prefixes of the strings, and not only the full strings. (eg: to compare "Facebook" with "Facebook Inc."). Also normalize the capitalization of the strings before comparison (make them all lowercase, etc.), and maybe remove punctuation as well.

Experiment with a few of the above, see if the results make sense, and fine tune the method accordingly. Also using other metadata will help. URL and context/topic words/entities occurring around the company name will be associated with the company, and can help find the right groupings. This will be more involved though, so you may want to attempt this later on, if the simpler approaches do not suffice.