If you care about spoilers, you probably shouldn't read much further.
I've always maintained that my least favorite thing in a narrative is when the author lies. I don't mean when he or she omits information or misdirects the reader, or when a narrator is simply wrong, I mean when a third person omniscience actively lies. To that point, what really bothered me about M. Night Shyamalan's The Villiage was the establishing scene: the opening funeral in which we clearly see a gravestone marked 1897. The atmosphere of the film -- the costumes, the speech, the settings -- is enough to sell the audience on the idea that this is the 19th century, and letting the audience assume that information makes the reveal that it is in fact the early 21st much more powerful than just pulling the rug out from under the viewer. It crosses over from an "aha!" reveal to a "gotcha!"; a movie that could have been a good episode of The Twilight Zone turns into a bad episode of The Outer Limits.
J.J. Abrams has a problem with that line as well. Sometimes his insistence on secrecy works out quite well (Cloverfield and its monster) and sometimes not so well (most of Lost). Star Trek Into Darkness didn't need secrets, but Abrams decided to shove one in anyway: who Benedict Cumberbatch was playing. It was obvious that Cumberbatch was playing Kahn, but instead of copping to it or just winking and smiling slightly, what we got from the producers was a full on "It's not Kahn!" The reaction was even more wearisome when it was used to divert criticism -- ie, complaints that the most british man on the planet is playing a a man originally of ambiguous ethnicity (though clearly not Caucasian) were met with the "It's not Kahn" refrain instead of a conversation on why ethnicity wasn't necessarily important to the character (originally a Sikh played by a Mexican of Spanish heritage) or any other response to engage. Abrams wants to have his secrets, but more importantly he wants everyone to know he has his secrets, which meant that when John Harrison declares that he is, indeed, Kahn, most of the audience goes "duh" instead of producing the intended "gasp". (Admittedly, the audience Abrams was hoping for -- those who are familiar enough to know who Kahn is but haven't been following every drop of information coming out about the movie -- do exist, and I was lucky enough to see it with one member of that subset. He loved it.)
Anyway, the secrecy only stands out to me because of Iron Man 3. The Mandarin is a racist stereotype of a villain, a leftover from an era of Yellow Peril and the pulpy "mysteries of the orient" that infected a lot of pop culture in the 20th century. When it was announced that he would be the villain in the new Iron Man I groaned. I'm sure that when Ben Kingsley was said to be playing him there were some geeks out there wondering why an Indian/British actor was playing the oriental baddie, but I never saw it. Maybe I just wasn't paying attention, but but it seems Shane Black and the production company embraced The Mandarin and let the world react how they might. In that, they created the misdirection they wanted, and anyone who reacted (like I did) with a "really? the Mandarin?" was in for as great a surprise as anyone else. First, the character was reinvented as a bin Laden-esque terrorist (another eye roll) and then revealed to be a complete joke, a creation of the real bad guy playing on the expectations of the in universe public and the audience.
So the lesson! It is possible to still have secrets even in the age of the internet and total information. But don't be smug about it, and definitely don't lie. After all, the best way to get away with a twist is to not let anyone know to expect one.