Key even linked it to the election of Donald Trump, telling Zuckerberg one of the things that drove Trump's election was a feeling the world was not fair.
He said Facebook's own users could revolt and turn on it if it was not addressed.
"There could ultimately be consequences and they should deal with it."
He said he had told Zuckerberg he should think about how to resolve that, "or at least demonstrate to the world that they do pay their fair share of tax in every location."
"I think if they don't, the same people who are its users will wake up one day and say 'why do I have to pay my tax if this company is not going to."
He said there was no question Zuckerberg was philanthropic.
"But if I was running Facebook or a multinational in the modern world we live in, I'd make sure most countries or every country felt tax was being fairly paid."
"It wasn't so much about whether they pay their fair share of tax in New Zealand or didn't - maybe they do and maybe they don't. But I think when the shorthand for a problem around multi-nationals not paying their tax is 'Facebook' then I can't see how that's a good thing for Facebook. I think as a company they've got a PR issue."
Zuckerberg was a keynote speaker at the summit, speaking of the importance of connectivity.
In a post on his own Facebook page - followed by 77,580,783 people - Zuckerberg put up photos from the summit, including one featuring Key and Canadian Prime Minister Justin Trudeau.
"If we make the right investments now, we can connect billions of people in the next decade and lead the way for our generation to do great things," Zuckerberg wrote.
Great day in Peru discussing connectivity programs with 20+ presidents and prime ministers. If we make the right...
Posted by Mark Zuckerberg on Saturday, November 19, 2016
New Zealand is among 96 countries that are working on a multilateral tax treaty developed by the OECD to tackle tax avoidance strategies used by multinational companies, that are known by the acronym for base erosion and profit shifting (BEPS).
A Herald investigation in March found the 20 multinational companies most aggressive in shifting profits out of New Zealand collectively paid virtually no income tax.
The companies in question, including Facebook, Google and Pfizer, said they followed New Zealand laws and differences in profitability between their New Zealand operations and elsewhere were the results of different business models.
Facebook paid just $43,000 tax in New Zealand on $1m in revenue, according to recent financial statements.