New York: Reacting to the fatal shooting of a black man in Minnesota which went viral on social media after it was uploaded on Facebook Live, the social media giant's CEO Mark Zuckerberg said his heart went out to the family.

The killing of Philando Castile, 32, who was shot by a police officer after a traffic stop on Wednesday, created a furore across the US and on social media.

Castile's girlfriend Diamond Reynolds went live on Facebook immediately after her fiance was shot by police in his car.

"My heart goes out to the Castile family and all the other families who have experienced this kind of tragedy. My thoughts are also with all members of the Facebook community who are deeply troubled by these events," Zuckerberg wrote.

Castile later died from his wounds. In the video, Reynolds' four-year-old daughter is seen watching the incident from the back seat.

According to Reynolds, the police had pulled their car over for a broken tail light in Falcon Heights district.

"The images we've seen this week are graphic and heartbreaking, and they shine a light on the fear that millions of members of our community live with every day," Zuckerberg said.

"While I hope we never have to see another video like Diamond's, it reminds us why coming together to build a more open and connected world is so important -- and how far we still have to go," he posted.

Reynolds' video disappeared from Facebook Live after nearly one million views on social media and news websites.

"We're very sorry that the video was temporarily inaccessible. It was down due to a technical glitch and restored as soon as we were able to investigate," a Facebook spokesperson told tech website Tech Crunch.

The video, however, returned to the site after about an hour with a warning labeled "disturbing".

Castile's death occurred within a day of the shooting of 37-year-old Alton Sterling in Baton Rouge, Louisiana.

Sterling was killed during an altercation with two white police officers and a video of the incident recorded by a bystander on his smartphone triggered outcry on social media.

In a Facebook post, President Barack Obama reacted to these incidents.

"All Americans should be deeply troubled by the fatal shootings of Alton Sterling in Baton Rouge, Louisiana and Philando Castile in Falcon Heights, Minnesota. We've seen such tragedies far too many times, and our hearts go out to the families and communities who've suffered such a painful loss," he posted.

"Although I am constrained in commenting on the particular facts of these cases, I am encouraged that the US Department of Justice has opened a civil rights investigation in Baton Rouge, and I have full confidence in their professionalism and their ability to conduct a thoughtful, thorough, and fair inquiry," he added.

But regardless of the outcome of such investigations, what was clear is that these fatal shootings are not isolated incidents.

"They are symptomatic of the broader challenges within our criminal justice system, the racial disparities that appear across the system year after year, and the resulting lack of trust that exists between law enforcement and too many of the communities they serve," Obama added.

Facebook launched live video feature streaming in August 2015.