Results 1 to 3 of 3

Thread: Facebook Post Status - 403 error

  1. #1
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    1,070

    Default

    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.
    Craig Walls
    Spring Social Project Lead

  3. #3
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default

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

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •