Pope Francis wrapped up his Polish visit Sunday with a huge outdoor Mass where he told young people to look beyond the instant gratification afforded by technology, and instead to try to change the world.

Hundreds of thousands of young people, many of whom camped out for the night, waved national flags and cheered as Francis arrived to say the Mass in a large field on the outskirts of Krakow at the end of his five-day trip to Poland where he presided at the Catholic Church's World Youth Day festivities.

Francis, 79, who has said he is a "disaster" with technology, sprinkled his sermon at the last major event of the trip with social media and technology terms.