its tested code to get products from magento oAuth 1.0 based API.
first add consumer key and secret as mentioned in file. second set domain name and callback url.
callback url example
if above file placed in htdocs than path will be like localhost/adminauth.php to run this file, in this case localhost/adminauth.php is callback url.