If your light works when you move the wire and not the bulb socket, then look into the 2 wires, a hot and a ground. Wiggle them independently if you can and see which has the effect. If you have a voltmeter, remove the bulb formthe socket in your fog light, turn the meter to DC volts, put one lead to a solid not painted or corroded part of the frame and connect the other to the positive on your battery (to make sure yo ahve a good ground and the meter is working). If that shows voltage then CAREFULLY put the lead you put to the positive of the battery to the bottom center post in the socket because if you short between the bottom center post and the metal outer holder of the bulb you will blow a fuse or burn more wires if it is already a weakened wire by a cut or bad insulation (make sure you have the light switch on to the fog lights). If you ahve voltage here then you have a bad ground, if not then a bad positive lead. If you suspect a bad positive wire and you have someone is there to help, keep the leads connected as I stated last and have someone wiggle the wire you said casued it to turn on for a second and you should get voltage then.
You can spliice the wire using a butt connector and replace the bad section of wire but my history has shown that connectors corrode over time. If you do use a connecotr, use an electrical anticorrosion paste and some heat shrink to keep the weather out.
Hope this helps.