I have lived in 3 different cities on quite opposite realities in my country, and I can say with a certain degree of certainty that, despite living on each of these places for over 10 years, I was never anywhere a good person for foreign travelers to ask advice about.
If you are like most people, you will realize that works for you too. We are used with the city, the living conditions, the public transportation and the local society - but what we are not really used to is how Tourism is handled, even if we were tourists once, times change. So why should we know it better, we live on those places! We know a couple of great places to settle for a weekend, but we might never have visited one or other tourism spots simply because they are too touristy for our local life, or because we snubbed them in favor of our favorite places. Even when we do visit these places, we visit with a whole different mindset than those who come from afar to visit: we know the locals, the language, we are in our home, we can allow compromises a tourist cant, and we can always come back for more if we wronged the timing.
But Touristic advice is not the only part that locals are not so good about advising, the real problem is when people want to know how things work in our country, how is the infrastructure, the problems, the rights, the daily-life. That is when things are thrown out the window and we will usually give really bad advice. We might not realize it, but we do, and here is why: Locale bias.
I will give a classic example of how it works. Some years ago, Japan made headlines across the world due to sexual harassment in the metros. It was a big thing in Japan, and the media elsewhere made is also big. Woman were being bullied on the metros, perverts would grope them, would take pictures of their panties using camera phones, it was "bad". Some local news network even brought specialists to "explain" why it was happening in a first world country, they would ramble on about their culture, and other nonsense that actually seemed perfectly plausible for us, far and away from Japan. But the one important fact they ignored was, obviously, Locale bias.
For those in Japan, crime rate had reached near zero, Homicides were extremely rare, infrastructure was certainly first-world level, and despite them entering a "recession" (which would endure up to this date), purchase power parity was high. Health care one of the best in the world, education too. So, what should them nag about? what would media nitpick? Well, someone groped a woman on a train, queue the main headline news. It is not that the problem didn't exist, it is that all other more important problems where gone. All the other countries, commenting on how Japan were filled with perverts, simply ignored the fact that in their own public transport, woman was also being groped, bullied and taken pictures of, except if one of them bothered to go to the police or officials about it, they would literally laugh at her, probably saying something on the lines of "when we solve all the murders in town, we will look for your pervert".
It is easy for us to think our problems are bigger than the problem of others, and it gets worse when we actually lack serious problems. When we don't live in a country at war or controlled by gangs and violence, it is easy to say that theft is out of control and killing the economy. When everybody have electricity, tapped water, treated sewer and solid streets and public transport, the littering on the streets becomes simply unbearable. All these small problems, that every country have but don't have the luxury to worry about, become our main problems.
And thus, every problem the local community have, no mater how insignificant compared to the world average, become big, and also the main topic that will start a conversation on "what are the problems of your country?". Nobody would dare ask that to someone who lives in a country with famine, war or a nasty dictator in power, but when we live in peace, we do, because the problems are no longer macabre, they are nasty, annoying, casual-talk-worthy and such that maybe even the community can help with them.
So before you take at face value advice of people who live in a country, remember that their reality is different. A "severe problem with sexual harassment" might actually be smaller than the "not even mentioned" in another country, the "black people are prejudiced because others stare and choose not to sit at their side" pales in comparison when there are countries doing racial cleansing, or where police are 3 times more likely to kill a black innocent than a white. It is extremely important to consider the local reality.
And that is where the "you need to live on a place to get to know it" comes from. Tourists have a whole different set of problems and realities than residents, and because of that, what they face will also be different. People treat tourists differently, and tourists don't face some of the realities of the place he is visiting, so you should always get advice from the same degree of perspective as you are expecting to encounter: Ask other tourists about their experiences, not residents. Almost invariably, the residents (temporary or not, expats or locals) will give you worst expectations than tourists. Their reality is different, and their value is different.
And let this also serve as a notice for expats or locals when advising tourists. Your problems are different then theirs, so try not to scare them with problems that they don't even would notice because things work differently on their country, focus on what is indeed different.