With millions of people traveling to unfamiliar cities to spend holidays, travel recommendation becomes necessary to assist tourists in planning their trips more efficiently. Serving as a prerequisite to travel recommender systems, understanding tourist behavior patterns is therefore of great importance. Recently, geo-tagged photos on social media platform like Flickr provide a rich data source that captures location histories of tourists and reflects their preferences. This article utilizes geo-tagged photos from Flickr to extract trajectories of tourists, and then extends the concept of motifs from topological spaces, to temporal spaces, and to semantic spaces, for detecting tourist mobility patterns. By representing trajectories in terms of three distinct types of travel motif and further using them to measure user similarity, typical tourist travel behavior patterns associated with distinct sightseeing tastes/preferences are identified and analyzed for tourism recommendation. Our empirical results confirm that the proposed analytical framework is effective to uncover meaningful tourist behavior patterns.