我试图像我的Android应用程序那样做一个fb。
我已经使用FB登录并获得了活动会话和身份验证令牌。
我试图做一个"喜欢"到我墙上的照片。
所以我假设postId是10154208667515153
?
然后我用ui线程尝试这段代码。
Session session = Session.getActiveSession();
if (session == null) {
}
List<String> re = session.getPermissions();
Request request = new Request(session,
"486130591514106" + "/likes", null,
HttpMethod.POST, new Request.Callback() {
@Override
public void onCompleted(Response response) {
// Request complete
String re = response.toString();
}
});
request.executeAsync();
拥有权限:
[publish_checkins, status_update, photo_upload, video_upload, email, create_note, share_item, publish_stream, publish_actions, user_birthday, user_location, user_likes, user_interests, user_friends, user_status, basic_info]
但是我收到以下错误:
{Response: responseCode: 403, graphObject: null, error: {HttpStatus: 403, errorCode: 200, errorType: OAuthException, errorMessage: (#200) Permissions error}, isFromCache:false}