You should have these following keys: Consumer Key, COnsumer Secret, Access Token, and Access Token Secret which should be ported to your Apex code as well. I will show you how to generate those keys manually. So, you dont need to use the url and callback mode.