For a recent animation, we've tried every conceivable compression method with only disastrous results when uploaded to Facebook, including H.264, MPEG (variations), AVI.
For the record, YouTube quality is perfect. It is not down to the settings in the comp (1080p 25pfs). We've never been able to achieve decent facebook quality. We've followed the Facebook guidelines too.