Mr. Modi &. Mr. Zuckerberg, the chief executive of Facebook, who runs a social network with 1.5 billion active users. Both see themselves as global leaders pushing for broad social change, and both routinely use social media to communicate with their many millions of fans.
On Sunday, the two men engaged in a admiration session at Facebook’s Silicon Valley headquarters, with Mr. Modi Answering questions from a crowd of Facebook employees and guests invited by the Indian Embassy.
Mr. Modi praised social networks like Facebook, Twitter and Weibo.
“The strength of social media is it can tell government where they are going wrong,” Mr. Modi said. “We used to have elections every five years. Now we have them every five minutes.”
Mr. Modi has been meeting the technology executives and seeking their ideas and assistance in bringing India fully into the digital world. Silicon Valley has been eager to assist. India is the world’s fastest-growing major economy.
About tens of thousands of Silicon Valley technology workers are of Indian descent and eager to give something back to their country.
The prime minister, sees technology as a way to lift India out of poverty.
“In this digital age, we have an opportunity to transform the lives of people in ways that were hard to imagine just a couple of decades ago,” Mr. Modi said in San Jose on Saturday in a dinnertime speech to about 500 technology leaders, including the chief executives of Microsoft, Google, Adobe and Uber.
Naren Gupta, a founder of the Silicon Valley investment firm Nexus Venture Partners, who helped organize Mr. Modi’s visit, said the prime minister wants tech companies to help him bring about that transformation.
“Innovation is a state of mind, and he is saying, help him bring that state of mind to India,” Mr. Gupta said. “Big changes are pretty much impossible to make. What you need to do in a democracy is take a thousand little steps.”
Mr. Modi’s message of partnership with American technology companies has been carefully choreographed to appeal to his constituents back in India, a country that is rapidly discovering the Internet and the start-up culture.
On Saturday, Mr. Modi stopped by Tesla Motors, the electric-car maker, and met three of the technology world’s most powerful executives: Timothy D. Cook of Apple, Sundar Pichai of Google and Satya Nadella of Microsoft.
At the subsequent dinner, the tight connections between American companies and the Indian government were apparent.
Mr. Modi announced that Google had agreed to provide free public Wi-Fi in hundreds of Indian railroad stations, which are major transit and social hubs for their communities.
Recalling his childhood in India, Mr. Nadella pledged that Microsoft would help India bring wireless Internet to its 500,000 villages, but offered no details. “What opportunities can we unlock, what changes can we spark?” he said.
Qualcomm, a chip maker with thousands of employees in India, promised $150 million to finance Indian start-ups.
After the Facebook visit on Sunday, Mr. Modi visited Google and Stanford University.