WP-API / client-cli

65 stars 20 forks source link

undefined index: oauth_token in lib/commands/oauth1.php line 69 and 80 #21

Closed javorszky closed 10 years ago

javorszky commented 10 years ago

I'm following the docs. Using VVV, latest oauth plugin and client-cli

I generate the keys:

vagrant@vvv:/srv/www/server/wp-content/plugins/client-cli$ wp oauth1 add
ID: 3403
Key: A7qjbeSycs4F
Secret: x4VUp0aE9q1jz0S06VcKyjS8ZZ0daLshF8Y4SNt4eQKFYg0b

Then I run the command on the client:

vagrant@vvv:/srv/www/client/wp-content/plugins/client-cli$ wp --require=client.php api oauth1 connect http://bbboltserver.one.localhost/ --key=A7qjbeSycs4F --secret=x4VUp0aE9q1jz0S06VcKyjS8ZZ0daLshF8Y4SNt4eQKFYg0b
PHP Notice:  Undefined index: oauth_token in /srv/www/client/wp-content/plugins/client-cli/lib/commands/oauth1.php on line 69
PHP Notice:  Undefined index: oauth_token in /srv/www/client/wp-content/plugins/client-cli/lib/commands/oauth1.php on line 80
Open in your browser: http://server.localhost/oauth1/authorize?oauth_token=
Enter the verification code:
Error: 401 Unauthorized

The script waits for me to enter the verification code. What's that?

javorszky commented 10 years ago

Nope, my bad, I polluted the return value 2 days ago. It works as intended!