Both sentences are correct. The simple tense is used for an event that happened and is finished. The past continuous is used for something that happened over a period of time. Which one you use depends on the meaning you want to convey.
For example:
You'll never guess who I just talked to. (I had a conversation with someone we both know.)
You'll never guess who I was just talking to. (I was talking to someone we both know. We usually use words like 'when', 'during', 'while', etc. to emphasize the duration.) "You'll never guess who I was talking to while I was waiting for you."