I would suggest that you go to Facebook. Why? Being an SV company, they will generally treat developers better than say Palantir. Being treated as a valuable member of the team and not a cost center is very important for job satisfaction. (And those free lunches/snacks will definitely help you save some money in NYC)
To start your career at a place where one has to solve huge scaling issues will really do you good. You may not understand everything right away but you would be trained from the beginning to think of scaling anytime you solve a problem. I don't know much about Palantir but I will doubt if they have scaling problems as big as Facebook.
Finally, brand name. Whenever you will decide to move on to the next job, you will have a much easier time if you were at Facebook v/s Palantir. Trust me, this is important. You should view each job opportunity as a stepping stone for your overall career.
So assuming that pay/perks/benefits are more or less similar, I would highly recommend that you join FB.