O.J. Simpson testified this week that he’d been drinking all day on Sept. 13, 2007, before he bizarrely robbed two sports memorabilia dealers in a Las Vegas hotel. But sources close to the case wonder if it was watching “The Oprah Winfrey Show” that afternoon that made Simpson snap.

Before Simpson headed to the Palace Station Hotel to rob the dealers, the family of Ronald Goldman, who was murdered along with Simpson’s ex-wife Nicole Brown Simpson, were on “Oprah” to discuss the controversial book “If I Did It: Confessions of the Killer.”

It was a repackaged version of a “fictitious” book Simpson had written titled simply, “If I Did It,” based on the murders of which he was acquitted in 1995. That project was scrapped, and the rights were handed over to the Goldman family after Simpson was ordered to pay $33 million to the victims’ families in a wrongful death civil suit.

The Goldmans appeared on “Oprah” the same day the new version of book — which included comments from the Goldmans — was released.

The family repeatedly denounced Simpson’s effort to publish the original tell-all. “It’s sending him a message,” Kim Goldman, Ronald’s sister, said on “Oprah.” “He spent hours putting together this ‘confession’ about how he killed Ron and Nicole — and he worked hard, thinking he was going to make millions off of it. And we snatched it . . . out from under him.”

Later that night, one-time NFL star Simpson and several accomplices committed the robbery, for which he’s serving a 33-year prison sentence.

When we asked Simpson’s rep Craig Brand to comment on the coincidence, he said in a statement: “The matters you are bringing up are non-related. Vegas has nothing to do with the Goldmans, nothing to do with Oprah, and I doubt O.J. even saw the episode . . . You are over-reaching, but I can appreciate the creativity! LOL.”

Simpson appeared in a Nevada court this week to appeal his sentence, claiming bad legal advice led to his conviction. He testified that he drank heavily the day of the robbery, but the curious timing of the “Oprah” episode didn’t come up.