Fasting is good if you make lifestyle changes afterwards, eating healthy. If you fast that long, your metabolism will be slow for a few weeks before it gets back to normal again. So, if you go back to eating the way you did before you will put back on all the weight and even more. That is why people advise against it for weight loss. You would have to eat really careful afterwards or it will just be a waste, and it wouldn't be worth going through all that trouble of fasting. So make sure you know how you are going to eat afterwards, have a diet plan ready.
A low fat vegan/vegetarian diet is good for keeping weight off afterwards.