我想在某篇po文按讚
這是我的code
Button likeView = (Button) rootView.findViewById(R.id.like_view);
likeView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Request reqlike = new Request(Session.getActiveSession(),
"322372034467971_1025413444163823" + "/likes", null, HttpMethod.POST, new
Request.Callback() {
@Override
public void onCompleted(Response response) {
// PARSE THE "response"`enter code here` TO CHECK FOR
ERRORS OR SHOW A SUCCESS MESSAGE OR SOMETHING
}
});
Request.executeBatchAndWait(reqlike);
}
});
可是出現錯誤訊息
{Response: responseCode: 200, graphObject: null, error: {HttpStatus: -1,
errorCode: -1, errorType: null, errorMessage: com.facebook.FacebookException:
Session provided to a Request in un-opened state.}, isFromCache:false}
請問一下這是什麼問題,謝謝