Don't do this; the cooking oil will (a) go rancid and (b) gum up with time. Don't use WD-40 either, that is not a lubricant.
Go get some light machine oil / 3-in-1 oil / mineral oil from the hardware store, shouldn't be more than a couple bucks, and a squeaky hinge can wait to be fixed until next time you're out.