Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oauth API client getting Error

Tags:

php

oauth

Can anyone tell how I can implement a Oauth api for my site.I have downloaded the example from http://code.google.com/p/oauth-php/downloads/list(oauth-php-175.tar.gz)

I have created the database and run the register.php file in example/server and i got a consumer key and secret key.I have replaced the api key and secret key with this in client/twolegged.php.The url mentioned their is replaced with server/www/hello.php

But when i run the file client/twolegged.php am getting the error

ExceptionRequest failed with code 401: Can't verify request, missing oauth_consumer_key or oauth_token-OAuth Verification Failed: 

Is it the correct way to do this? Please help me?

like image 685
Warrior Avatar asked Nov 03 '22 20:11

Warrior


1 Answers

Use

$server->verifyIfSigned(false) 

instead of

$server->verifyIfSigned() 

in hello.php

like image 62
Warrior Avatar answered Nov 12 '22 16:11

Warrior