Is the comma after the word and in this sentence correct?
Social networks made having friends obsolete and, frankly pathetic.
The word frankly is an discourse marker which, in a parenthetical way, makes a self-referential comment about the sentence itself. The writer is telling us that he or she thinks something is pathetic, oh, and that he or she is being frank in telling us that.
As such, in polished writing, this word should be bracketed by two commas: ... and, frankly, pathetic. These commas separate it from the surrounding material, similarly to parentheses. One is not enough. If you omit the commas, it is sloppy: and frankly pathetic. This looks like the adverb frankly is modifying pathetic, giving rise to the question what it means to be frankly pathetic.
Worst to best:
The question to ask isn't so much which is correct, but in what kind of writing are these various forms acceptable. 1 and 2 do not belong in formal writing. They are fine in informal e-mails, SMS texts and such. In an instant message, it might even be even appropriate to spell it frkly, by which point commas have probably gone out the window.
3 is acceptable in formal writing, but 4 is more polished.
In some kinds of writing, there is no place for a discourse marker such as frankly at all. For instance, it would not be appropriate in a Wikipedia page, except in a direct quote of someone's speech or literary excerpt, because it introduces a first person commentary which is inappropriate for presenting the bare facts.
If you were writing an opinion column for a respected newspaper with a wide circulation, you'd probably want to have both commas: and, frankly, dear readers ... In a municipal rag you could squeak by with and frankly, dear readers ...
Try writing it this way:
I think the em dash makes it all much better, and much clearer besides.
I suppose some folks might still want to not have a comma after frankly, though.
A single comma after "and" does not make sense by any grammar rule I know of.
Without the word "frankly", you would most naturally write the sentence with no commas: "Social networks made having friends obsolete and pathetic."
You could insert "frankly" with no commas -- "Social networks made having friends obsolete and frankly pathetic." But that's probably not quite what the writer means. He doesn't mean that the pathos is frank. He means that he will state frankly what having friends is: it is pathetic. In this case we commonly offset a word like "frankly", i.e. we write, "... made having friends obsolete and, frankly, pathetic", to indicate that "frankly" is not modifying "pathetic", indeed it is not modifying any word that explicitly occurs in the sentence. Rather, it is modifying an unstated "I say". The writer is trying to convey the idea that he is writing this frankly, not that anything actually mentioned in the sentence is doing anything frankly.
I've heard teachers and grammarians criticize such phrasing as ungrammatical. I recall one lecturer complain in a similar context that the word "hopefully" is often used to mean "I hope". He offered the example, "Hopefully, he will be depressed." Who is being hopeful here, he asked? The person who is depressed? How can you be depressed hopefully? Of course what the speaker surely means is, "I hope he will be depressed."
So I suppose a case could be made that the sentence with or without the commas is just bad grammar. That you should say, "I would like to frankly say that social networks made having friends pathetic." But if you put commas around "frankly", we all know what you mean, so in my humble opinion it's a perfectly good sentence. As long as you include both commas.