我从Facebook墙上检索了所有帖子,但现在我想要使用post_id
来发帖。我正在使用以下代码,但得到下面提到的异常
{Response: responseCode: 200, graphObject: null, error: {HttpStatus: -1, errorCode: -1, errorType: null, errorMessage: null}, isFromCache:false}
我的代码:
Request likeRequest = new Request(Session.getActiveSession(), fBPostId + "/likes", null, HttpMethod.POST, new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
Log.d("Like clicked",response.toString());
}
});
Request.executeBatchAndWait(likeRequest);
答案 0 :(得分:0)
您应该授予“publish_actions”权限。
如果您使用的是LoginButton:
loginButton.setPublishPermissions(Arrays.asList("publish_actions"));