Facebook error response of type OAuthException: Error validating application. Invalid application ID

Console error: Facebook responded with HTTP status code 400 and response body: {"error":{"message":"Error validating application. Invalid application ID.","type":"OAuthException","code":190}}

---------------------------------------------------------------------------
com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: Error validating application. Invalid application ID.
 com.restfb.DefaultFacebookClient$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookClient.java:576)
 com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookClient.java:537)
 com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:485)
 com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:445)
 com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:405)
 com.restfb.DefaultFacebookClient.fetchObject(DefaultFacebookClient.java:250)
 com.vicwalks.web.util.SocialMediaUtil.getFBUserInfoUsingRest(SocialMediaUtil.java:97)
 com.vicwalks.web.service.impl.SocialMediaService.getFacebookUserDetails(SocialMediaService.java:88)
 com.vicwalks.web.action.FacebookLoginAction.loginStatus(FacebookLoginAction.java:75)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 java.lang.reflect.Method.invoke(Unknown Source)
.................
..................
................



Solution: Please check the URL that you are sending to facbook to fetch user details. For example, 
https://graph.facebook.com/me/permissions?access_token=AAACchSmfp9ABAL22hBqtv591lpzZAqU7NhKD0gJT9n1lI4mUXIK67Mk66i0jKfWdXn0kOTo6vYp0xcrnZBmphXsrfDjuBMiCt34ZAWthQZDZD&expires

So see here the Access token conatins '&expires' string at the end, so remove it and send again.

Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine

Session timeout interceptor in struts 2