Extension wire power supply

Anyone here used 4 wire phone cord to extend the usb power supply? I have an old camera that I removed from the front door, used 2 of the wires (probably 26 ga) , put usb connectors on both sides, about 30 ft in length, plugged everything together. It sort of works, but it doesn’t stay connected to the internet. Any opinions?