The Oscar-winning writer of “The Social Network” and creator of “The West Wing” joins Tyler Foggatt live onstage at The New Yorker Festival.