The NYPD yesterday forced the social-media giant to hand over information about the nut-job tweeter who threatened to recreate the Colorado massacre at a Broadway theater.

After receiving a subpoena from the Manhattan DA’s Office, Twitter caved and revealed details to help identify the kooky creep, whose tweet handle is @obamasmistress, law-enforcement sources told The Post.

The twisted tweeter had targeted the Longacre Theatre on West 48th Street, where former heavyweight boxing champ Mike Tyson is appearing in a one-man show, “Undisputed Truth.’’