NEW YORK — Twitter and Comcast have signed a partnership that will let viewers access TV shows and buy movie tickets directly from a tweet, deepening the short messaging service’s ties to television programming.

Twitter Inc. and Comcast Corp. said Wednesday that a new feature that’s part of the deal will let customers of Comcast’s Xfinify TV service tune in to programs by clicking a “see it” button in a tweet. In a statement, Comcast CEO Brian Roberts called it “an instant online remote control.”

The button will allow Twitter users who are also Comcast customers to set DVRs, tune in to shows online, on TV or on mobile devices. They can also buy movie tickets through Fandango. In the current TV season, shows on NBC, USA, Bravo, MSNBC and other networks will be accessible through the “see it” button. Comcast and Twitter said they are in talks with other TV networks and companies that will use the feature in the “coming months.”

Twitter’s deal with the nation’s largest cable company comes as the company prepares for an initial public offering of stock, which could occur as soon as next month.

The agreement also has an advertising component, which adds NBCUniversal’s properties to Twitter’s Amplify program.

Amplify lets TV content owners beam real-time video clips to Twitter users.