BOSTON (KRON/AP) – A Harvard University student says he lost his summer internship at Facebook after he launched a browser application from his dorm room that exploited privacy flaws on the Menlo Park company’s mobile messenger.

Aran Khanna says his app called Marauder’s Map showed that users of Facebook Messenger could pinpoint the exact locations of people they were talking to.

“I didn’t write the program to be malicious,” he said. Khanna says he thought he was actually doing a public service as he created the app to show the consequences of unintentionally sharing data.

Khanna launched Marauder’s Map, which he named in tribute to the Harry Potter books, from his dorm room in May. He says it was downloaded by 85,000 people.

The Harvard students days later, Facebook asked Khanna to disable it. A week after that, Facebook released a Messenger app update addressing the flaw.

Facebook spokesman Matt Steinfeld said the company had been working on a Messenger update months before it became aware of Khanna’s app.

“This isn’t the sort of thing that can happen in a week,” Steinfeld said.

Two hours before he was supposed to leave to start his internship, Khanna received a call from a Facebook employee telling him that the company was rescinding the offer because he had violated the Facebook user agreement when he scraped the site for data.

Khanna wrote about the experience in a case study published Tuesday for the Harvard Journal of Technology Science. He spent the summer interning at a Silicon Valley startup and said the back-and-forth with Facebook ended up being a learning experience as well.

Facebook co-founder Mark Zuckerberg launched the social media site from a Harvard dorm room in 2004.