We live in an age where online surveillance by government and law enforcement is increasingly common, but the big social networks are pushing back against the spying. Last year it was Twitter that cracked down on developers who make surveillance tools; now, Facebook and Instagram are banning the practice.

Facebook announced the changes to its policies yesterday, which also apply to Instagram. They include the addition of "language to our Facebook and Instagram platform policies to more clearly explain that developers cannot "use data obtained from us to provide tools that are used for surveillance.""

In October last year, the American Civil Liberties Union (ACLU) obtained government records that revealed Twitter, Facebook, and Instagram had provided user data to software company Geofeed. The startup used this information in its social media monitoring product, which was marketed to law enforcement as a way to monitor activists and protestors.

The three companies ended their relationship with Geofeed after the revelations came to light. Twitter said it would completely eradicate such practices. "Using Twitter's Public APIs or data products to track or profile protesters and activists is absolutely unacceptable and prohibited," the company said.

Facebook has faced pressure from groups such as the ACLU, Color of Change, and the Center for Media Justice to do more about the spying. The site says it has been taking action against any devs creating surveillance tools for some time. "Our goal is to make our policy explicit," said the social network. "Over the past several months we have taken enforcement action against developers who created and marketed tools meant for surveillance."

The groups have welcomed the policy change. Nicole Ozer, technology and civil liberties director at the ACLU of California, said: "Written policies must be backed up by rigorous oversight and swift action for violations. Now more than ever, we expect companies to slam shut any surveillance side doors and make sure nobody can use their platforms to target people of color and activists."