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(DefaultFacebookClient.java:766)
    at com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookClient.java:688)
    at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:630)
    at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:592)
    at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:556)
    at com.restfb.DefaultFacebookClient.fetchConnection(DefaultFacebookClient.java:219)

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>