Announcement Announcement Module
Collapse
No announcement yet.
Facebook Post Status - 403 error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Facebook Post Status - 403 error

    Hello,

    I am attempting to use the Facebook integration with Spring Social.

    I have setup the standard configuration and have authorised my app to use my facebook account using the connect/facebook url and the ConnectController. This is storing my access token etc fine in the database as expected.

    I then attempt to use the Facebook object to call:

    Code:
    public void postStatusWithLink(String link, String name, String caption, String description) {
    		FacebookLink fLink = new FacebookLink(link, name, caption, description);
    		facebook.feedOperations().postLink(caption, fLink);
    	}
    However, when I attempt to execute the above code I get the following error, is there some setting in my Facebook app configuration I need to change?

    Code:
    org.springframework.social.OperationNotPermittedException: (#200) The user hasn't authorized the application to perform this action
    	at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleFacebookError(FacebookErrorHandler.java:123)
    	at org.springframework.social.facebook.api.impl.FacebookErrorHandler.handleError(FacebookErrorHandler.java:60)
    	at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486)
    	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443)
    	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:415)
    	at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:294)
    	at org.springframework.social.facebook.api.impl.FacebookTemplate.publish(FacebookTemplate.java:203)
    	at org.springframework.social.facebook.api.impl.FeedTemplate.postLink(FeedTemplate.java:178)
    	at org.springframework.social.facebook.api.impl.FeedTemplate.postLink(FeedTemplate.java:167)
    	at com.tmm.enterprise.socialcv.service.FacebookService.postStatusWithLink(FacebookService.java:20)

    Thanks,
    Rob

  • #2
    When you made the connection, did you ask for "publish_stream" permission in the scope parameter (as mentioned in the JavaDoc for the postLink() method)? If not, then you're going to get an exception (although I would've expected an InsufficientPermissionException...but I think I know why you got OperationNotPermittedException). If you did ask for that permission and are still getting this or some other exception, let me know and I'll dig some more.

    Comment


    • #3
      ahh excellent - there is no javadoc showing up for the method in my ide, but i saw the code on github.

      Thanks!

      Comment

      Working...
      X