restfb-examples icon indicating copy to clipboard operation
restfb-examples copied to clipboard

help me

Open ShafiqSadat opened this issue 7 years ago • 4 comments


Exception in thread "main" com.restfb.exception.FacebookOAuthException: Received Facebook error response of type OAuthException: (#200) Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages as an admin with sufficient administrative permission (code 200, subcode null) 'null - null'
	at com.restfb.exception.generator.DefaultFacebookExceptionGenerator$DefaultGraphFacebookExceptionMapper.exceptionForTypeAndMessage(DefaultFacebookExceptionGenerator.java:174)
	at com.restfb.exception.generator.DefaultFacebookExceptionGenerator.throwFacebookResponseStatusExceptionIfNecessary(DefaultFacebookExceptionGenerator.java:59)
	at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:918)
	at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:836)
	at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:389)
	at com.restfb.DefaultFacebookClient.publish(DefaultFacebookClient.java:414)```

Someone has a simple example to use the new version
I looked at YouTube but did not
A simple example to post a text in a new version 2.10

ShafiqSadat avatar Sep 30 '18 04:09 ShafiqSadat

Your access token need some permissions, as the error message says.

  • publish_to_groups if you like to send your message to a group.
  • Or manage_pages and publish_pages if you like to post as a page.
  • You cannot post to the user feed, because Facebook removed this function some months ago.

So, can you elaborate the problem a bit more.

nbartels avatar Sep 30 '18 10:09 nbartels

But my access token has all the access!

ShafiqSadat avatar Sep 30 '18 16:09 ShafiqSadat

So, i also try to run examples and can says all of them is depricated in v 3.3, so there is only one way to see api docs on facebook

velykov avatar Jul 24 '19 15:07 velykov

Yes, we should renew the examples ... sadly Facebook is trimming the access to their API from version to version. So a current example can show only some poor requests.

nbartels avatar Jul 25 '19 20:07 nbartels