Open marekslim opened 10 years ago
Hi
You should be able to add read_stream permission by adding the following hidden form field to the facebook submit forms in oauthlogin.jsp and oauthconnect.jsp
<input type="hidden" name="scope" value="read_stream" />
Hope this helps, Cheers, Michael
I tried it before:
<form class="login"action="http://localhost:8080/connect/facebook" method="POST">
<input type="hidden" name="scope" value="read_stream" />
<p><input type="submit" value="Connect with Facebook" /></p>
</form>
I have the same exception.
I discovered that in the page: https://developers.facebook.com/apps/{YOUR_APP_ID}review-status/ you can apply to use "read_stream" permission. I did it some days ago, but I am waiting for Facebook to approve it. Can it be the reason of my problem ?
public_profile
When I have the code:
... @Autowired private Facebook facebook;
@RequestMapping(value = "/buttonClick") public String facebook() { FacebookProfile facebookProfile = facebook.userOperations().getUserProfile(); //WORKS (and return proper data) List list = facebook.friendOperations().getFriendProfiles(); //WORKS (and return proper data)
facebook.feedOperations().getHomeFeed(); //EXCEPTION
...
}
When I call this method I have an Exception:
HTTP Status 500 - Request processing failed; nested exception is org.springframework.social.InsufficientPermissionException: The operation requires 'read_stream' permission.
My facebook app is configured like that: AppDetails -> Configure App Center Permissions:
Where should I define the 'read_stream' permission ? What do I do wrong ?