Buccal administration route is a promising way for a large number of drugs exhibiting a low oral bioavailability. The present work describes the formulation and evaluation of a mucoadhesive and thermosensitive in situ gelling delivery system based on poloxamer 407, poloxamer 188 and xanthan gum for buccal drug delivery. First, the mucoadhesion properties were evaluated using a tensile test. The effect of xanthan gum on the mucoadhesion force was demonstrated. Then, to assess the buccal residence time which reflects the mucoadhesion properties, the validation of a fluorescence probe for in vivo optical imaging experiment was conducted. Methyl-Cyanine 5 derivative (Me-Cy5) was used to label the hydrogels, dissolution tests and permeation studies through buccal epithelium cells showed that Me-Cy5 release from hydrogels was mainly due to an erosion mechanism and presented a limited penetration across epithelium cells. These results suggest that, Me-Cy5 is a suitable marker for thermosensitive in situ gelling delivery systems as the probe mostly stays entrapped in the hydrogel and do not cross the epithelial barrier. Buccal residence performance of the hydrogel was evaluated for the first time by non-invasive optical imaging after administration to mice. This technique is an interesting alternative compared to visual observations and sacrifice involved experiments, which could also be exploited to various administration routes.