WASHINGTON — The Warriors aren’t visiting the White House during their annual trip to the nation’s capital, but they did visit former President Barack Obama.

A picture surfaced Thursday on social media of almost the entire roster posing with Obama. No coaches were present; just players.

In September 2017, after Golden State won its first NBA title with President Donald Trump in office, Trump tweeted, "Going to the White House is considered a great honor for a championship team. Stephen Curry is hesitating, therefore invitation is withdrawn!"

In lieu of visiting the White House last February, the Warriors toured the National Museum of African American History and Culture with students from Kevin Durant’s hometown of Seat Pleasant, Md. After winning the NBA title again last June, Golden State needed no tweet from Trump to know it wouldn’t plan on attending the White House.

No formal activity was planned ahead of the team’s game Thursday night against the Wizards. However, at least 14 players — including Curry, Durant, Draymond Green, Klay Thompson and DeMarcus Cousins — met with Obama, whom Golden State had visited at the White House after winning the 2015 NBA title.

“It was amazing," Durant said after Thursday’s 126-118 win over the Wizards.

Nancy Pelosi, the speaker of the U.S. House of Representatives, talked with Curry after the game for several minutes before taking a selfie with the two-time MVP. “Continued luck and success making this country better,” Curry was heard telling Pelosi.

Connor Letourneau is a San Francisco Chronicle staff writer. Email: cletourneau@sfchronicle.com. Twitter: @Con_Chron