The US president’s biggest foray into African affairs has not turned out well.