I was talking with one of my relatives, with whom I do not have a cordial and friendly relationship. In the middle of our conversation, he said to me, "I missed seeing you." I replied, "By Allaah, I missed seeing you too." I did not intend to swear an oath that I missed seeing him; I merely said so out of courtesy. Is it obligatory for me to expiate for that oath?
All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Apparently, your oath is considered a false oath (Yamaan Ghamoos) because you swore an oath on something you know is false, merely out of courtesy. Swearing a false oath deliberately is known as Al-Yamaan Al-Ghamoos. It is too serious and grave to be expiated. The oath-taker in such a case should turn to Allaah The Exalted in repentance and seek His Forgiveness. The Shaafi‘i scholars, however, believed that the oath-taker, in this case, is obliged to pay expiation, turn to Allaah The Exalted in repentance, and seek His Forgiveness. This is of course if you intended to swear an oath when you said, "by Allaah".
However, if you did not intend to swear a binding oath and merely said those words inadvertently without having the intention to make an oath, then you only bear the sin of telling a lie, not that of swearing a false oath. Ibn Qudaamah said, "If the person swears an oath inadvertently like someone who says, 'Yes, by Allaah', and 'No, by Allaah,' in the context of his speech, it is not incumbent on him to offer expiation and such an oath is considered meaningless." [Ash-Sharh Al-Kabeer]
In this case, the oath is meaningless, which involves no sin and entails no expiation. However, you bear a sin for telling a lie.
Allaah Knows best.
You can search for fatwa through many choices