i was playing basketball today and my lips were getting dry so i licked my lips and swallowed saliva a few times on purpose, and i licked my lips and wiped with my shirt then i swallowed saliva. i went home and saw people say it’s haram to lick your lips then take the saliva back and swallow it is my fast invalid?, if it is invalid does the matter change if i didn’t know licking your lips and swallowing broke fast
No it doesn't break your fast. It is completely natural and infact, it's important to swallow your saliva because if not you might find yourself gasping for air. If it's thick mucus however, you should spit it out, but even that, wouldn't break your fast.
"It is haraam to swallow mucus whether one is fasting or not, because it is considered to be dirty and it may carry diseases produced by the body. But it does not break the fast if a fasting person swallows it, because it does not come from blood and swallowing it is not regarded as food or drink. If he swallows it after it reaches the mouth, it does not break the fast. From the words of Shaykh Muhammad ibn ‘Uthaymeen, may Allah have mercy on him."- Al-Sharh Al-Mumti’, 6:428.
If this answer helped you please accept my answer. :)