Its a well-known secret that only Palantir has this type of contract signed with Facebook. A funny insiders anecdote is that some people joke about how this agreement is being signed: left side: By Board Member of Facebook: Peter Thiel. right side: By Board Member of Palantir: Peter Thiel.
This ability to query Facebook data anyway they want to is what gives Palantir competitive age. Tech stack is irrelevant; you might as well run it from a MS Access 2005, and you would still find clients, because they don't buy technology, but the result of crunching of data (well maybe something that hold more rows though)
Those who knows beginning of Palantir from a cocktail napkin times know it was a perfect asnwer to a question how to use FB data and make extra extra money. They's how Palantir was born.
Anyways, what most likely happened is that NYPD got enough of solid information on this and probably is questioning legality of pulling data from FB by Palantir without violating whole set of rules, laws, and US Constitution as well; hence they decided to stop before they may become part of a bigger lawsuit.