A former Facebook marketing partner will remain cut off from the social media giant's ecosystem after failing to convince a federal judge that Facebook acted outside its rights when revoking the company's licenses to its platforms.

In a bench ruling, U.S. District Chief Judge Phyllis Hamilton of the Northern District of California denied content marketer Stackla's motions for a temporary restraining order and preliminary injunction that would restore the company's access to Facebook and Instagram.

At Wednesday's hearing, Jeffrey Tsai of DLA Piper in San Francisco argued on behalf of Stackla that Facebook's decision to boot the company from its sites was a pretext to protect its reputation after a Business Insider article wrongfully implicated the company in "Instagram's Cambridge Analytica Moment." Tsai said it was wrong of Facebook to terminate its contracts with Stackla seven days after the article was published, without a chance for Stackla to defend itself.

"I'm not persuaded by the pretextual argument, and I think [Facebook is] entitled to rely on the Business Insider article as a basis to initiate further inquiry," Hamilton said.

Stackla, which uses artificial intelligence to connect brands with publicly available user-generated social media posts, gathers approximately 80% of its content from Facebook and Instagram, according to a declaration from company CEO Damien Mahoney.

On Aug. 30, Stackla received a cease-and-desist letter from Facebook after Business Insider reported that the company was among several marketing partners that violated Instagram's terms of service by scraping and storing user data. In its letter to Stackla, Facebook outlined alleged violations of the federal Computer Fraud and Abuse Act and the California Comprehensive Computer Data Access and Fraud Act, as well as Facebook and Instagram's terms of use.

Stackla claims it only uses an approved application programming interface to access user data and that Facebook's accusations are unfounded—fueled not by evidence of wrongdoing, but an effort to avoid more backlash around its privacy protocols. However, Facebook has said it began investigating Stackla well before the marketer received any bad press.

Representing Facebook, Sonal Mehta of Wilmer Cutler Pickering Hale and Dorr, said the company's first investigation of Stackla's privacy violations began in May after receiving a tip. The initial investigation was inconclusive, but in August the company escalated its inquiry and Facebook's anti-scraping team found evidence of automated scraping of user data.

"If you look at the number of calls being made in our system, it wouldn't be possible to do that manually," Mehta said. "It would have to be automated, and that expressly violates our terms."

Mehta also argued that Stackla failed to show evidence of irreparable harm required to invoke a temporary restraining order. Hamilton agreed.

"I am not convinced you've established irreparable harm," she said. "You use speculative language like 'it might happen soon' … and 'will soon reach a tipping point.'"

The judge did not consider in her decision a last-minute declaration added the night before the hearing, because she did not get a chance to read it and the defense did not have a chance to respond. A redacted declaration from Seann Birkelund, Stackla's chief financial officer and chief operating officer, gave more concrete details of the companies reportedly declining financial situation. Stackla's lawyers asked to file the declaration under seal.

Even with the benefit of Birkelund's input, Mehta said that Stackla undermines its case for emergency intervention. "In that declaration, Stackla states how many days they have left," she said. "It's not a handful of days, not this week, and not the week after." Additionally, she said, less than 10% of Stackla's 380 customers have threatened to cancel contracts.

The judge also ruled that Stackla did not fulfill the public interest prong of its temporary restraining order. The company argued that it was in the public's interest to prevent "the imminent destruction of Stackla's business and certain insolvency while the Court examines the legal issues prevents the termination of Stackla's client contracts, preserves employee jobs and investor relations."

"Equally if not more critical here is the public interest requirement," she said. "I don't find that the temporary restraining order will be in the public interest."