I bet it was a combination. A pear fast would be very similar to a water fast, as pears are mostly just water, fiber and a bit of fructose (fruit sugar). So you detoxed very fast, and if you didn't do anything to support the detox effect such as colonics and detox baths, then yes, headaches and worse symptoms will ensue.
The other thing that probably went wrong was it could have been too much Sugar for you.
Regardless, you did the right thing by ending the fast. Fasts should not continue when weakness and shaking results.
So glad to hear that the ACV drink is helping you out. :) It's always nice to hear of success stories, and it helps other readers too. :)