According to "Does the center hold?" by Donald D. Palmer, Socrates's main argument during his trial was that "he knew nothing". But Socrates discussed various topics with many people, he had knowledge in many areas. Can we then consider him a liar?
Not to dispute Dr. Palmer's account, but Socrates' main argument at his trial was that he was not trying to impose knowledge on the citizens of Athens. Instead — to use Socrates' analogy — he was like a horse-fly, biting at their presumptions and assumptions and forcing them out of the complacent drowsiness of mere 'knowledge' into philosophical engagement with their own beliefs and understandings. He was pushing the people of Athens to think for themselves, not trying to get them to listen to his ideas, and thus he could not rightfully be accused of corrupting anyone.
We might accuse Socrates of being a pain in the you-know-what — and it appears he would gladly agree with us — but I don't think it's correct to accuse him of lying.
Socrates might not have ever claimed this.
See here. An example of what he did say is:
I am wiser than this man, for neither of us appears to know anything great and good; but he fancies he knows something, although he knows nothing; whereas I, as I do not know anything, so I do not fancy I do. In this trifling particular, then, I appear to be wiser than he, because I do not fancy I know what I do not know.
Socrates is saying here that he does not know anything great and good, not that he does not know anything at all.
In context here. He goes on to describe that craftsmen do have knowledge.
And in this I was not deceived; they did know what I did not, and in this way they were wiser than I. But, men of Athens, the good artisans also seemed to me to have the same failing as the poets; because of practicing his art well, each one thought he was very wise in the other most important matters, and this folly of theirs obscured that wisdom
Socrates is not denying the possibility of knowledge held by others, nor is he saying he holds no knowledge. He is simply saying no one has certainty on the big questions (such as politics and justice), and he thinks he is better because he acknowledges this.
You stumbled over the Socratic paradox.
It is a classical example of the Dunning–Kruger effect: You need a certain minimal competence to begin to perceive your own degree of incompetence.
Because reality is arguably infinitely complex chances are that any increase in competence only increases the insight into the vastness of our incompetence. Socrates, surely one of the brightest and smartest, was simply more aware of it than most of us.
It is only consequent that his preferred way of teaching was the Socratic method: He did not disseminate ready-made truths but ironically challenged what others thought was evident.
No, I don't think so; or at least I don't think the sources you've cited in your questions show this. I don't think that Socrates claims that he knows nothing at all; on close reading, the claim that he makes is a more limited claim, and that claim that he does make seem to be compatible with discussing many topics intelligently and in-depth.
So here's why I don't think Socrates made the claim that he knows literally nothing. What he claimed is that he lacked a certain kind of wisdom (Greek: σοφία, "sophia") and that he had very little knowledge (Greek: ἐπιστάμενος, "epistamenos"). Without seeing the footnotes, I can't know for sure, but from your description it seems likely that Palmer is referring to the following line of argument, which you can find in Plato's "Apology of Socrates", mainly in the section 21a-23c (English translation by Harold North Fowler; boldface added):
[21a] And you know the kind of man Chaerephon was, how impetuous in whatever he undertook. Well, once he went to Delphi and made so bold as to ask the oracle this question; and, gentlemen, don't make a disturbance at what I say; for he asked if there were anyone wiser than I. Now the Pythia replied that there was no one wiser. [...]
[21b] [...] For when I heard this, I thought to myself: “What in the world does the god mean, and what riddle is he propounding? For I am conscious that I am not wise either much or little. What then does he mean by declaring that I am the wisest? He certainly cannot be lying, for that is not possible for him.” And for a long time I was at a loss as to what he meant; then with great reluctance I proceeded to investigate him somewhat as follows.
I went to one of those who had a reputation for wisdom, [21c] thinking that there, if anywhere, I should prove the utterance wrong and should show the oracle “This man is wiser than I, but you said I was wisest.” So examining this man—for I need not call him by name, but it was one of the public men with regard to whom I had this kind of experience, men of Athens—and conversing with him, this man seemed to me to seem to be wise to many other people and especially to himself, but not to be so; and then I tried to show him that he thought [21d] he was wise, but was not. As a result, I became hateful to him and to many of those present; and so, as I went away, I thought to myself, “I am wiser than this man; for neither of us really knows anything fine and good, but this man thinks he knows something when he does not, whereas I, as I do not know anything, do not think I do either. I seem, then, in just this little thing to be wiser than this man at any rate, that what I do not know I do not think I know either.”
It's probably clear from context already in the English translation, but the part where Fowler translates Socrates as saying "this man thinks he knows something when he does not, whereas I, as I do not know anything, do not think I do either" is much more concise in the Greek; the line in Greek is "οὗτος μὲν οἴεταί τι εἰδέναι οὐκ εἰδώς, ἐγὼ δέ, ὥσπερ οὖν οὐκ οἶδα, οὐδὲ οἴομαι" (houtos men oietai ti eidenai ouk eidos, ego de, hosper oun ouk oida, oude oiomai), lit. something like: "he supposes he knew something, not knowing; but I, as I know not, don't suppose." The point here is to distinguish the self-conscious ignorance that Socrates has about things that are "fine and good" (καλὸν κἀγαθὸν, "kalon k'agathon") from the unconscious, double ignorance that the politician has (because he does not really know anything fine and good, but he also wrongly thinks that he does, i.e., he is both ignorant of the things, and ignorant of his own ignorance).
Socrates describes this as the first of a series of question-and-answer conversations -- he compares the process here to the labors of Heracles -- with other politicians and orators, with poets, and with craftsmen; he says that each time he found his conversation partners had the same problem of double ignorance. (He says that he found the poets unable to explain the meaning of their own best poems, and concluded that they wrote fine things by inspiration rather than knowledge; he says that the craftsmen in fact had a great deal of technical knowledge about their own crafts, but also that their knowledge of their own craft led them ignorantly to believe themselves just as knowledgeable about the greatest matters outside their specialty.)
This is important within the context of the "Apology" because Socrates apparently intends to contest the way that his accusers have presented him during the trial — as a false teacher who claims to have uncovered secret knowledge of cosmic or religious truths (about the gods or about things "beneath the earth and in the heavens") and to share this secret knowledge with students. Socrates insists that he has never claimed to have sophia about these things, nor to teach others sophia about these things:
What did those who aroused the prejudice say to arouse it? I must, as it were, read their sworn statement as if they were plaintiffs: “Socrates is a criminal and a busybody, investigating the things beneath the earth and in the heavens and making the weaker argument stronger and [19c] teaching others these same things.” Something of that sort it is. For you yourselves saw these things in Aristophanes' comedy, a Socrates being carried about there, proclaiming that he was treading on air and uttering a vast deal of other nonsense, about which I know nothing, either much or little. And I say this, not to cast dishonor upon such knowledge, if anyone is wise about such matters (may I never have to defend myself against Meletus on so great a charge as that!),—but I, men of Athens, have nothing to do with these things.
To come around to the direct answer to your question: (1) Socrates — at least, as portrayed in the "Apology" and our other main sources — never claimed that he knew nothing at all; he claimed that he had no wisdom (sophia) about a certain set of topics of great importance, distinct from the mundane business of human life (including the nature of things that are fine and good, divine matters, and the things beneath the earth and in the heavens). (2) He had conversations with many people that closely involved some of those topics (the nature of the fine and the good, the nature of the gods and of religion, etc.) where he claimed to have no wisdom/sophia. (3) According to his own account, the way that these conversations typically went was that his interlocutor (conversation partner) claimed to have wisdom/sophia about those topics, and initially seemed to have it, but when Socrates asked them questions about the basis for or the implications of their claims, it turned out that they did not have the wisdom they claimed. So (4) if Socrates had an advantage in wisdom/sophia over his interlocutors when it came to these specific philosophical topics, it was only that he was aware of his own ignorance about them, and did not pretend to wisdom/sophia about those matters that he did not have.
If we take this all more or less at face value, then I don't see that there is any reason to describe Socrates as a liar, at least not from this, without some further argument. Socrates knew some matters of fact about ordinary life but he never claimed not to (for example, he knew who won the battle of Potidea, because he was in it; he knew some things about stone-cutting because he was a stone-cutter by trade). This ordinary human knowledge would most likely be counted within the very little knowledge/epistamenos that he did acknowledge having.
He had conversations about other, extraordinary things but his method in those conversations was not to claim that he had wisdom/sophia about the truth of those matters. His method was to direct pointed questions to those who did claim to have wisdom/sophia about the truth on those topics. It may be possible to do this without having wisdom/sophia of your own. Suppose that I don't know where the library is, but my interlocutor claims that they do know where it is. So I ask them how I would get to the library from here, and as they try to answer, I ask follow-up questions to make sure that I understand. I might be satisfied with the directions; but if my interlocutor is being vague or if their answers are confusing or inconsistent with each other, then I might suspect that they don't really know where the library is. The important thing here is, I don't need to secretly know where the library is in order to be able to make that judgment. Socrates in the "Apology" seems to be claiming that he is in a position like this in his famous conversations about the fine and the good or about the gods and religion. In the "Apology," Socrates actually does describe this as a kind of sophia that he might be said to have -- but it is a very limited kind of mere "human wisdom" (ἀνθρωπίνη σοφία, anthropine sophia), which consists in the consciousness of his own ignorance of the nature of fine, good or divine things, not in a superior knowledge of the true nature of such things. (Ap. 20d).
Now, there is a vast and long-running literature on the theme of "Socratic irony" (εἰρωνεία, eirōneía) is faking or pretending ignorance about the matters that he discusses with others, in order to draw them out in the discussion or to gain some kind of advantage over them. That is to say, the question about "Socratic irony" is more or less (1) whether Socrates knows (or thinks he knows) something that he's not saying overtly in his conversations, and (2) whether this hidden knowledge (or hidden pretense of knowledge) is strongly influencing the conversation, for example, the direction of the questions that Socrates chooses to ask when he questions his interlocutor's claims to knowledge. The claim about irony seems to have come up within Socrates's own career (for example, Plato puts a reference to the question in the middle of the dialogue in the Meno [79e]-[80d]) and the question has run through more or less the whole history of philosophy since then; for modern examples see e.g. Allan Bloom's long interpretive essay in his translation of The Republic of Plato, Gregory Vlastos's article "Socratic Irony" and book, Socrates: Ironist and Moral Philosopher (Cornell, 1991), Iakovos Vasiliou's "Conditional Irony in the Socratic Dialogues" (Classical Quarterly, 1998), Danielle A. Layne's "From Irony to Enigma: Discovering Double Ignorance and Socrates' Divine Knowledge", etc. etc.
That is a rich and fascinating topic, but I don't think that either answer to that question is obvious just from Socrates's arguments as presented in the "Apology." If there is some reason to think that he was faking or pretending about his ignorance, this would have to draw on much more in many other texts than the rather limited claims that he makes within the "Apology," and on more than just the fact that he had drawn-out conversations about topics that he claimed to be ignorant of (for the reasons discussed above, that might be explained as similar to the "Where's the Library?" conversation, at least from what we've looked at so far). If there is some strong reason to think that he is speaking ironically or concealing some knowledge that he denies having elsewhere, then the evidence for that would need to draw on something else in addition to this.
If you do think that Socrates is being ironic in the dialogues, and does know something that he's not saying about the topics of those dialogues, then the question would be (1) what evidence you have from the text for concluding that he is hiding knowledge or otherwise speaking ironically; then (2) what you take the aim of the irony to be, in particular whether the aim is to deceive, to conceal (which is not always the same thing; if you ask me what my password is I won't tell you, even though I know; but this is not deception), to pretend or perform (which is not the same thing as lying either -- I played at being a ninja when I was young, although I was not one; but this was not a lie), or to do something else again. Whether or not this conflicts with his claim in the "Apology" that he lacks divine wisdom/sophia about certain kinds of topics depends on showing, (1) that he has knowledge about those topics, but also (2) that the knowledge you claim him to have is the same kind of knowledge he means by divine sophia when he denies having divine sophia about those things. An argument for both (1) and (2) would be very interesting to hear, but it probably needs to draw on a lot more evidence than what we have in a quick reading of the "Apology."
A quick note on names and sources. I've been talking about what "Socrates" said and did, based on how you posed your question above in the OP. The best available primary sources that we have on the arguments Socrates gave at his trial are two texts, both called the "Apology of Socrates," which were written down after his death by two of his students, Plato and Xenophon. (Plato's "Apology of Socrates" is online here and Xenophon's "Apology of Socrates" is online here "Apology" here is from the Greek "apologia," meaning a speech made in defense; the meaning does not have to do with apologizing or saying sorry.) Plato's version of the speech is much more influential in the history of philosophy than Xenophon's, and the arguments about knowledge are found in Plato's version. (There's nothing too extraordinary about this; both Apologies must have been an attempt to reconstruct the speech as best they could after the fact; Xenophon's version is explicitly a condensation of touching on themes that he says he found important.) There are huge and important questions about how closely or accurately the character of Socrates in Plato's and Xenophon's dialogues represent the arguments, views or character of the historical person Socrates; this is not at all settled, but it is most common to conclude, for a whole lot of reasons, that some of Plato's dialogues (mainly the short "early" dialogues like the Euthyphro, Apology, Crito, etc.) stick more closely to things that the historical Socrates said and did, while in others (for example long "middle" and "late" dialogues like the Republic or the Parmenides) the character of "Socrates" is more often used to explore Plato's own philosophical thinking. Many scholars do tend to think that Plato's and Xenophon's "Apologies" provide some reasonably good evidence of what Socrates may really have said and done during the defense at his trial. Most of what I said in the above answer about "Socrates" is intended to be drawn from a close reading of Plato's version of Socrates in the "Apology", but it also draws somewhat from what Socrates is portrayed as saying in other dialogues, mainly the "early" and transitional dialogues by Plato.