Obama, meanwhile, calls for tougher gun laws and says internet platforms need to reduce the influence of hate groups.
Following a weekend with two mass shootings, President Donald Trump directed the Department of Justice to team up with local, state and federal agencies to work harder to find potential attackers. He also called on social media companies to "develop tools to detect mass shooters before they strike."
On Saturday, 20 people died in a mass shooting in a Walmart in El Paso, Texas. Another two victims died Monday morning, bringing the death toll to 22. Early Sunday, nine people died in a mass shooting in Dayton, Ohio.
The alleged 21-year-old gunman in the El Paso shooting posted a manifesto on the anonymous forum 8chan. This is the third time this year an alleged mass shooter posted on 8chan before an attack, and it led security platform Cloudflare to drop 8chan as a client.
During a speech Monday at the White House, Trump said the internet acts as a "dangerous avenue to radicalized, disturbed minds."
"The perils of the internet and social media cannot be ignored and will not be ignored," Trump said. "Hate has no place in America."
Former President Barack Obama also tweeted about the mass shooting Monday. He differed from Trump by saying tougher gun laws are needed, and that "the evidence shows they can stop some killing." Obama also said there's a need to address online hate.
"Both law enforcement and internet platforms need to come up with better strategies to reduce the influence of these hate groups," Obama said.
Later in his speech, Trump called for the end of the "glorification of violence," focusing on the video game industry.
Gaming company Take-Two Interactive CEO Strauss Zelnick responded by saying that "blaming entertainment is irresponsible," according to The Hollywood Reporter on Monday.
"Moreover, it's disrespectful to the victims and their families," Zelnick told the publication. "Entertainment is consumed worldwide. It's the same worldwide. Gun violence is uniquely American and we need to address the real issues."
Trump also asked the FBI to identify what resources the agency needs to investigate and disrupt "hate crimes and domestic terrorism," and said mental health laws must be reformed. Trump said he will direct the Department of Justice to propose legislation to treat hate crimes and mass shootings as capital crimes that can result in the death penalty.
Apple CEO Tim Cook expressed outrage over the shootings on Sunday, saying it's time to "come together to address this violence for the good of our country."
The Justice Department declined to comment.
Originally published Aug. 5, 8:15 a.m. PT.
Update, 8:45 a.m. PT: Adds more details from speech. 8:57 a.m. PT: Adds background information. 9:30 a.m. PT: Updates the El Paso death toll. 11:20 a.m. PT: Adds the Justice Department declined to comment. 12:16 p.m. PT: Adds Obama tweet. 1:11 p.m. PT: Adds reported response of Take-Two.