I am getting the error from ur sample code
Error validating application. Invalid application ID.",
"type": "OAuthException",
"code": 101
though i have added app domain name as "localhost.com"
and site url as "Http//localhost.com:port_Number"/
Want help from u......