The fortune cookie is said to be a modern variation of a Japanese cookie called tsujiura senbei , which is rooted in a Japanese temple tradition of obtaining fortunes after temple offerings. The idea was said to have been brought to the U.S. by Japanese-American immigrants.