I am using rest api to post to wordpress. For authentication i stick with oauth1 .I installed oauth1 plugin and json rest api plugin in wordpress. I am using 2 leg authentication 

<https://code.google.com/p/oauth-php/wiki/ConsumerHowTo#OAuth_Consumer>

After putting key secret and the url i got the following error 

**ExceptionRequest failed with code 401: OAuth signature does not match**

can anybody pls figure out why this happen? what all modifications i need to make?