Reference : Hisn al-Muslim 185

(إِذَا دُعِيَ أَحَدُكُمْ فَلْيُجِبْ، فَإِنْ كَانَ صَائِماً فَلْيُصَلِّ، وَإِنْ كَانَ مُفْطِراً فَلْيَطْعَمْ) ، وَمَعْنَى فَلْيُصَلِّ أَيْ فَلْيَدْعُ.
--

When you are invited (to eat) then reply to the invitation. 
If you are fasting then invoke Allah's blessings (on your host), 
and if you are not fasting then eat.

Reference:
Muslim 2/1054.

Chapter: By one fasting when presented with food and does not break his fast