Paste
Pasted as Plain Text by Sakthi ( 11 years ago )
I just modify some coding for your FB login.
private void performPostImageOnWall(){
final Session.NewPermissionsRequest newPermissi Session.NewPermissionsRequest(this, Arrays.asList("publish_actions"));
Session openActiveSessi false, new Session.StatusCallback() {
@Override
public void call(Session session, SessionState state, Exception exception){
Log.d("FACEBOOK", "call");
System.out.println("isFetching "+isFetching+", session.isOpened()"+session.isOpened());
if (session.isOpened() && !isFetching){
Log.d("FACEBOOK", "if (session.isOpened() && !isFetching)");
isFetching = true;
session.requestNewReadPermissions(newPermissionsRequest);
Request postPicture = Request.newUploadPhotoRequest(session, bmp, new Request.Callback() {
@Override
public void onCompleted(Response response) {
// TODO Auto-generated method stub
System.out.println("response "+response.toString());
JSONObject graphResp
System.out.println("graphResponse "+graphResponse.toString());
}
});
postPicture.executeAsync();
}else {
if (!session.isOpened())
Log.d("FACEBOOK", "!session.isOpened()");
else
Log.d("FACEBOOK", "isFetching");
}
}
});
}
Revise this Paste