Cleaning the fingers after eating by licking them is a Sunnah of Rasulullah (Sallallahu Alaihi Wasallam). Hazrat Ka'b bin Malik (R) narrates that Rasulullah (Sallallahu Alaihi Wasallam) used to eat with three fingers and when he (Sallallahu Alaihi Wasallam) completed eating he (Sallallahu Alaihi Wasallam) would lick his (blessed) fingers. (Sahih Muslim)
In another Hadith, Hazrat Abu Hurayrah (R) narrates that Nabi (Sallallahu Alaihi Wasallam) said, “When you partake of meals, lick your fingers (after eating) because you do not know in which of them is the Barakah.” (Sahih Muslim)
The method of doing this has been outlined in the Hadith. Certain narrations indicate that Nabi (Sallallahu Alaihi Wasallam) used to lick his (blessed) fingers in the following order: First the middle finger, then the index finger and lastly the thumb.
Hazrat K'ab bin Ujrah (R) narrates, “I saw Nabi r eating with three fingers which were the thumb, the index and the middle finger. Thereafter I saw him licking them in the following sequence; first the middle finger, then the index finger and lastly the thumb.” (Al Mu'jamul Awsat lit Tabrani)