 Filming was completed in Hawaii and Los Angeles.While filming, lead actor Jason Segel told a "New York Times" interviewer that the naked breakup scenes were based on a real-life experience he had.The film features a great deal of improvised dialogue; according to director Nicholas Stoller, it's "60 or 70 percent scripted and then 30 or 40 percent improv".