You can connect Vref to Vdd, but it is easier just to set ADCON1 bits 5&4 to "0" which connects Vref to Vdd internally.

Also, READ YOUR DATASHEET. Here is a cut and paste directly from the A/D section of the 18F8722 datasheet:

The
maximum recommended impedance for analog
sources is 2.5 kΩ.


Other chips have similar recommendations.

Your 350K is WAAAAAY too high! If you really need a 350K pull-up, you will
have to buffer the analog signal with an op-amp to get accurate readings.


If you just want to sense the presence of an object, you would be better off using a digital input, and connecting the collector of your phototransistor to 5V through a 10K or 22K resistor.