1

Is it possible to create test users for a page the same way for an app?

I couldn't message from a page to test users created for an app that using graph-api (/{conversation-id}/messages) and am getting following error and also same from FB page as well.

com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: (#230) Permissions disallow message to user (code 230, subcode null)
        at com.restfb.DefaultFacebookClient$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookClient.java:1174) ~[restfb-1.18.1.jar:?]
        at com.restfb.DefaultFacebookClient.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookClient.java:1100) ~[restfb-1.18.1.jar:?]
        at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1041) ~[restfb-1.18.1.jar:?]
        at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:952) ~[restfb-1.18.1.jar:?]
        at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:444) ~[restfb-1.18.1.jar:?]
        at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:469) ~[restfb-1.18.1.jar:?]
MWiesner
  • 8,868
  • 11
  • 36
  • 70
  • There is no such thing as “test users for pages”. If you need to test any interaction between a page and test users – then you need to create a page as a test user first. (Log in as the test user from app dashboard, and then create a page like a normal user would.) – CBroe Feb 24 '16 at 09:18
  • @CBroe Thank you. What I am trying to do is, make more than one test users interact with a page say via messages and from page, I should be able to message them back using Graph-API. I can message from the page created by one of the test user id, but FB doesn't allow API/developer access for test user ids. – alienworkstation Feb 24 '16 at 15:44
  • _“but FB doesn't allow API/developer access for test user ids”_ – I don’t know what that’s supposed to mean. Test users can make API requests like any other user. – CBroe Feb 24 '16 at 17:34
  • @CBroe To access the page, need page access token which I can get using user access token for which I need to access the developer.facebook.com and as per the screenshot, with test user id, that is not allowed http://postimg.org/image/r70hlfpvn/ – alienworkstation Feb 24 '16 at 18:28
  • 1
    _“for which I need to access the developer.facebook.com”_ – no, you don’t. You just have to send the test user through the normal login flow (which you probably have implemented already anyway – and if not, it is easy enough to do most parts of the login flow “manually”, by simply making the right HTTP requests. https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow) – CBroe Feb 24 '16 at 18:43

0 Answers0