In a patch of scrubland across the road from the Facebook headquarters in Silicon Valley, a woman named Celma Aguilar recently walked along some overgrown train tracks. She stopped where a path forked into some vegetation, just a few hundred yards from the tourists taking photos by an enormous image of a “Like” icon at the campus entrance.

“Welcome to the mansion,” Aguilar said, gesturing to a rudimentary shelter of tarps hidden in the undergrowth.

The campsite is one of about 10 that dot the boggy terrain, and are a striking sight alongside the brightly painted, low-slung buildings housing the multi-billion-dollar corporation. The contrast epitomizes the Bay Area wealth gap.

Harold Schapelhouman, a fire chief whose department has dealt with conflagrations on the land, said he was struck by the disparities. “Their employees are very well taken care of. They have on-site medical facilities, dry cleaning, bicycle repair, they feed them and there are restaurants that are there. It’s amazing what Facebook does for its employees. And yet within eyeshot – it really isn’t that far – there are people literally living in the bushes.”

Schapelhouman said he was not blaming Facebook, though it is true that the success of technology companies has driven up real estate prices in the area. As a whole, California is one of the lowest-ranking US states for the availability of affordable housing, and has one-fifth of America’s homeless population. Irrespective of the utopianism that imbues Silicon Valley culture, the tech campuses are not immune to these broader social problems.

Aguilar, 44, said she was aware of the Facebook HQ, though she wasn’t quite sure what happened there as it always seemed so quiet. “Can I get a job there? So I can get out from here.”

The land where the encampments are located belongs largely to the state and private owners, and it takes 10 minutes to walk from one end to the other. Aguilar pointed out a pond, covered with scum, at which she said she sometimes washed. One campsite spills out from a huge clump of marshy greenery. Another is reached via a railway sleeper slung across a strip of water where a number of bike frames are submerged.

Salvadorian by birth, Aguilar said she once worked in nursing homes and at Burger King, and had four children. She said she had been homeless for about three years as a result of a crystal meth addiction, and thought she suffered from mental illness. “Can you see how the trees move?” she said as she sat on the rusted train tracks. “I like to think they’re talking to me.”

Friend requests and instant messages presumably zing back and forth on the other side of the street christened Hacker Way, but Aguilar said she had lost her Facebook password. “No matter what I do they don’t want to give it back to me.”

A man named Rafael Barajas Ortiz, living in a lean-to amid mud and trash, said that, like Aguilar, he had no phone. Another resident opened the door of his shelter, which was blocked off by fencing made of woven branches, and said “I don’t use Facebook”, before declining to be interviewed further.

Passing by on his bike, a local named Jesus said he did log on to the site, but he faced a problem familiar to many homeless people: he had nowhere to charge his phone. (He showed the Guardian his profile. The public pictures offered no hint he was on the streets.)

Although it is not widely known, phone ownership and even social media usage are relatively common among homeless people, even if not those living next to Facebook. One Bay Area survey of around 250 homeless people found that 62% had phones. A study of homeless youth in Los Angeles indicated that more than three-quarters used social media.

Devices and service plans are readily available because the federal government offers subsidized cellular service to low-income Americans. It is known as the Obamaphone program both to its users and its rightwing critics, but in fact it originated as a landline subsidy during the Reagan era. The minimum standards specify 500 minutes per month of talk time or 500 megabytes of 3G data, and consumers can get a combination of them.

“They use the phone for exactly the same reasons we use it,” said Allan Baez, who launched a program that involved giving hundreds of free, Google-donated phones to homeless people. The cameras are particularly popular. “They are individuals, they have kids, they have friends, they have good moments, and you take pictures.”

A Facebook spokesperson declined to comment on the encampments, though he noted that the company’s investments in local affordable housing include an $18.5m commitment announced late last year. Otherwise, the county provides an array of homeless services, and its homeless numbers have dipped a moderate amount, according to a 2015 count.

Standing amid waving grass near a campsite, Gonzalo Apale, in a filthy jacket and work boots, described social media access as almost a marker of his progress in life. “I’ll try to get a telephone very soon, I’ll use Facebook again,” he said with optimism.

Still, he tries to avoid walking on the same side of the road as the Facebook campus “because I don’t want people to see me like this”, he said. “Because they are clean and everything.”

Towards sunset, Aguilar took a path that spiraled up a small hill to a clearing littered with detritus.

“I’m going to make my house here,” she explained, gesturing at a partially unfurled tent. The Facebook campus was visible through the tops of the bushes. Preferably, she said, it would not be.

“The trees will grow and no one will see me.”