Tech companies make presence known at Pride parade

Tim Cook poses for selfies at the Pride Parade in San Francisco, June 28, 2015.
Megan Hawkins | CNBC

It was hard to miss the big Silicon Valley companies at San Francisco's gay pride parade Sunday.

Apple CEO Tim Cook spent hours taking selfies before the parade with his employees—8,000 of whom participated this year, the company said.

Google said it had 1,500 employees marching alongside someone operating the company's self-driving car. And Facebook employees just bustled through the streets jamming to electronic dance music.

The 45th annual parade came the weekend after the Supreme Court's 5-4 ruling that extended the right to marry to same-sex couples in all 50 states.

Read More Brands use social media to back same-sex marriage

Facebook almost was not allowed to march in the parade because of its "real name" policy. Since October, members of the drag community have protested the policy, which says users must go by their legal names on Facebook.

Debates heated up in recent weeks as SF Pride's board of directors considered banning the social media giant from marching. An online petition received more than 2,000 signatures to ban the company from marching in both the San Francisco and New York City Pride parades.

Read MoreRecord turnout for tech companies at Pride parade expected

But as San Francisco TV station KQED reports, after Facebook CEO Mark Zuckerberg reportedly called SF Pride board President Gary Virginia, the board voted 5-4 to allow the company to march.

And march they did. Despite numerous parade participants handing out stickers and holding up signs for the "#MyNameIs" campaign, which supports changing the Facebook policy, a sea of company employees grooved their way through downtown San Francisco wearing colorful Facebook t-shirts.

Facebook did not respond to a request for comment.

In all, about 25 technology companies marched in the parade, compared to last year's 15.