Hi,
I am learning OAuth to implement in my application.I used this step by step documentation to have test app for twitter authentication.Here is the following code:-

Qt Code:
  1. ox1 = new OXTwitter(this);
  2.  
  3. ox1->setClientId("client-id");//Id got from twitter application created.
  4. ox1->setClientSecret("secret-key");//secret key got from application.
  5. ox1->setUsername("user-id");
  6. ox1->setPassword("password");
  7.  
  8. connect(ox1, SIGNAL(linkedChanged()), this, SLOT(onLinkedChanged()));
  9. connect(ox1, SIGNAL(linkingFailed()), this, SLOT(onLinkingFailed()));
  10. connect(ox1, SIGNAL(linkingSucceeded()), this, SLOT(onLinkingSucceeded()));
  11. connect(ox1, SIGNAL(openBrowser(QUrl)), this, SLOT(onOpenBrowser(QUrl)));
  12. connect(ox1, SIGNAL(closeBrowser()), this, SLOT(onCloseBrowser()));
  13. ox1->link();
To copy to clipboard, switch view to plain text mode 
But i am getting error as follows:-

OXTwitter::link
O1:nTokenExchangeError: 202 "Error downloading https://api.twitter.com/oauth/access_token - server replied: Forbidden" "<?xml version="1.0" encoding="UTF-8"?><errors><error code="87">Client is not permitted to perform this action</error></errors>"
Login has failed

But the test application i created in twitter has permissions to read and write.So can anyone guide me on this.