[問題] Facebook對 po文按讚
我想在某篇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}
請問一下這是什麼問題,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.127.187
※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1449550827.A.14A.html
→
12/08 20:47, , 1F
12/08 20:47, 1F
→
12/08 20:48, , 2F
12/08 20:48, 2F
→
12/09 13:12, , 3F
12/09 13:12, 3F
→
12/09 13:12, , 4F
12/09 13:12, 4F
→
12/09 16:27, , 5F
12/09 16:27, 5F
→
12/09 22:20, , 6F
12/09 22:20, 6F