Application raises facebook OAuth Exception for all access

We are using restFB 1.6.12 and I get this error while trying to access the FB end point searching for messages. This is happening for an OAuth token which was recently created and also for older ones.

If I search friendsCount, publicEvents seems to work properly. But I search publicMessages, it doesn’t work throws an error.

com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: (#200) Must have a valid access_token to access this endpoint
    at com.restfb.DefaultFacebookClient$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(
    at com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(
    at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(
    at com.restfb.DefaultFacebookClient.makeRequest(
    at com.restfb.DefaultFacebookClient.makeRequest(
    at com.restfb.DefaultFacebookClient.fetchConnection(

How do I resolve this issue?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>