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.

Comments

Popular posts from this blog

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI