A flogging organised by the al-Shabab in Mogadishu took place in front of crowds of local residents.