Google is a direct competitor to Facebook when it comes to Ads. It doesn't really matter if the advertising is search based or social. They are vying for a piece of the same pie.
The really high valuation of Facebook is partly because investors expect it to grow substantially, at least in the short term. The fact that it's growth is lower than that of it's direct competitors (who have a much lower P/E) is not a good sign for the stock in days to come.