Fanfiction is fiction based on a work of art (in its broadest meaning) or the public persona of a (well-known) human being that is not designated an official part of the original universe (sequel/prequel/etc) by the rights-holder or creator of the work of art, and meant to be read (or listened to) in context of the original work of art or public persona.
"Work of art" here would be broad enough to incompass ephemeral media like the Folgers incest commercials. The sequels/prequels/etc are there to eliminate Star Wars tie-ins and the like, which I suppose could be considered fanfic, but generally isn't. "Read in context of the original" is to cut out reaction works – say, someone read The Cold Equations and wrote a refutation/reaction to it – but I'm not terribly attached to the wording.
no subject
"Work of art" here would be broad enough to incompass ephemeral media like the Folgers incest commercials. The sequels/prequels/etc are there to eliminate Star Wars tie-ins and the like, which I suppose could be considered fanfic, but generally isn't. "Read in context of the original" is to cut out reaction works – say, someone read The Cold Equations and wrote a refutation/reaction to it – but I'm not terribly attached to the wording.