this is a line spoken by Frank Morgan's depiction of the Wizard of Oz in the 1939 film, which debuted 20 years after Baum's death. It did not actually appear in the "Wonderful Wizard of Oz". The ending of "Steam Engines of Oz" wrongly attributes this phrase to Baum when it would've originated from the 1939 adaptation script writers Langley/Ryerson/Woolf. 
Misattributed 
Variant: A heart is not judged by how much you love; but by how much you are loved by others 
Source: The Wonderful Wizard of Oz
                                    
“Remember that the most important thing is to try and love other people as much as they love you.”
Source: Holidays on Ice
Help us to complete the source, original and additional information
David Sedaris 108
American author 1956Related quotes
“You must remember to love people and use things, rather than to love things and use people.”
Variant: The important thing is not to think much, but to love much.
Interview with PETA; as quoted in "T-Pain Teams Up With PETA To Remind Everyone To Treat Their Pets Like Family" https://www.hotnewhiphop.com/t-pain-teams-up-with-peta-to-remind-everyone-to-treat-their-pets-like-family-news.46218.html, HotNewHipHop.com (21 March 2018).
                                        
                                        Ride the River (1983), Ch. 5 
Context: Do not let yourself be bothered by the inconsequential. One has only so much time in this world, so devote it to the work and the people most important to you, to those you love and things that matter. One can waste half a lifetime with people one doesn't really like, or doing things when one would be better off somewhere else.