Image copyright Facebook Image caption Facebook founder Mark Zuckerberg announced the rainbow flag tool by changing his own profile pic

It was wildly popular, but not everybody likes Facebook's pro-gay marriage photo filter - it's prompted a backlash in Russia and across the Arab world.

If you went on Facebook over the weekend you may have seen friends' profile pictures turned multi-coloured. Maybe you even tinted your own pic. A rainbow filter tool was introduced by the company after last week's landmark Supreme Court decision which cleared the way for same-sex marriage across the US. But in some areas of the world the response to the initiative was less than enthusiastic - and even downright hostile.

In Russia, several filters were created which splash the colours of national flags rather than rainbow banners across a picture. One such app has been downloaded more than 4,000 times. "Our response to the rainbow world ‪#‏Proudtoberussian," said one typical comment by Moscow resident Elena Starkova.

Russia has controversial laws which ban providing information about homosexuality to people under age 18, and a recent poll showed that more than 80% of Russians oppose legalising same-sex marriage.

Despite this, some Russians backlashed against the backlash. Anna Koterlnikova, who had changed her profile pic to a rainbow flag, commented: "Sorry! I'm straight and Russian but I'm not a homophobe!"

In the Middle East, many social media users also came out strongly against the rainbow flag. "It's a message that it hurts me," said Egyptian Twitter user Sharif Najm, while Rami Isa from Syria tweeted: "Damn you and your marriage. You have distorted our innocent childhood [symbol], we used to like the rainbow." Ahmad Abd-Rabbuh, an Egyptian political science professor, said that gay marriage "is not in harmony with society and culture."

"I know that I will make many of my friends angry," he commented.

In Egypt, around 2,000 tweets mentioned the rainbow motif, most of them critical. Some users even went so far as to sarcastically blame a weekend storm on users who turned their profile pics multi-coloured. But not all reaction was negative. Egyptian TV presenter Muna Iraqi commented: "[I support people's] right to live and love freely, without any persecution."

Of course, it also should be noted that same-sex marriage is by no means universally popular in the US - about two-fifths of Americans oppose it, according to the Pew Research Center.

"I'm 100% against gay marriage," one American tweeted. "I have gay friends and they're great ppl; it's not personal. But U.S. can't decide. Should be state-by-state."

And some transsexual activists continued their criticism of Facebook - which sponsors San Francisco's gay pride parade - for its "real name" policy, an issue we've previously covered on BBC Trending.

Reporting by Olga Bugorkova and Ghada Tantawi

Blog by Mike Wendling

Next story: What should social networks do about hate speech?

Image copyright Getty Images

Extreme racist comments posted on the discussion website Reddit in the wake of the Charleston church shooting have once again raised questions about freedom of speech and the internet. How far should social networks go in censoring hate speech? READ MORE

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.