Hamas kommer att hålla sig till avtalet om vapenvila i Gaza, hävdar Turkiets president Recep Tayyip Erdogan.