"He was talking with you."
Translation:Lui parlava con te.
If he was talking with you it means that you were talking with him as well. On the other hand, if he was talking to you, it doesn't necessarily implies that you were part of the conversation.
Edit: Ahaha, I just saw your answer to dnovinc. Forget what I said then and thanks for the clarification (English is not my mother tongue either but it's getting better every day :)
There is a rule, and this is my generalization from it. "ti/mi/ci/vi/lo/la/gli/le/li" come before the verb. "te/me/noi/voi/lui/lei/loro" come after a preposition. I think the other thing to have to know is when it's a direct/indirect object for a few of them (lo/la/gli/le...). I hope this helps.
There is a good explanation here: https://forum.duolingo.com/comment/12538754/Ti-vs-te-as-direct-object.
In general, the variants like "te" and "me" are used when you are emphasizing the direct object pronoun. In the current example the speaker is emphasizing that it is not with someone else, but with YOU that she was speaking. These emphasized direct object pronouns come after the verb.
The second time that you use them - and this proves the exception to @Rana112966 's rule, is that this variant can also be used before the verb as an indirect object pronoun when used in conjunction with a direct object pronoun (e.g., "Te l'ho dato")
I think "Lui ti stava parlando./Lui ti parlava." aren't accepted because they both translate to "He was talking to you." meaning that he was the only one talking, while the initial English sentence uses the preposition "with" meaning that you and him were both talking. (btw I'm not a native English speaker so I could be wrong.)
edit: and I was wrong :) thank you AntonyHodgson for correcting me.
As a native English speaker, I can confidently say that "He was talking to you" does not imply that the conversation was one-way. For example, it would be perfectly normal to say "I was talking to him yesterday" to mean simply that I had a conversation with him then. Of course, one could also say "I'm talking to you!" when trying to get an angry adolescent to hear what you're saying (ie, where the 'conversation' is much more unidirectional). As I alluded to in my initial comment, there is a small distinction between the two - 'with' certainly does imply a two-way conversation, but I still think the two forms are mostly interchangeable in everyday life and that "lui ti parlava/stava parlando" should both be accepted.