Alternatives to the phrase 'I was like..'
Solution 1:
I was going along the street, and suddenly something happened, and I was like WTF!
It could mean, "I was going along the street, and suddenly something happened, and I said WTF!"
However, usually the person did not say those precise words. "I was like ..." is more a way of relating a reaction or even an emotion.
So it could mean, "I was going along the street, and suddenly something happened, and I thought/felt WTF!"
He told me something, and I was like dude really?
This translates as, "He told me something, and my reaction was 'dude really?'
Sometimes it could refer to verbatim speech but usually if someone wants to relay the exact words they spoke, it will go as follows:
'He told me something, and I actually said to him, "Dude really?"'
This emphasises a precise memory of what was said.
The expression is very informal and would not be expected in a business meeting or similar.
Solution 2:
colloq. (orig. U.S.). to be like: EOD
used to report (actual or simulated) direct speech (often expressing a person's feelings); to say, utter; (also) to say to oneself
As in:
2008 Daily Tel. (Sydney, Austral.) (State ed.) (Nexis) 7 June (Sport section) 88 When it came to the contract he cut it back a quarter, so I'm like, whatever, it's still more than what I was asking for.
Your two example sentences are grammatically correct. Some would choose additional punctuation.