Thursday, 22 August 2013

andriod app, Image does not display on Face book wall

andriod app, Image does not display on Face book wall

I want to post photo on user's wall.I have given a error message in
onCompleted() function.when i run my app logCat shows photo upload
complete ..but no uploaded photo is shown on my wall..where is the mistake
..Please guide me..Here is my Code
protected Void doInBackground(Void... params) { // start Facebook Login
Session.openActiveSession(ImageActivity.this, true, new
Session.StatusCallback() {
// callback when session changes state
@Override
public void call(Session session, SessionState state, Exception exception) {
if (session.isOpened()) {
Request request=Request.newUploadPhotoRequest(session,bitmap, new
Request.Callback() {
@Override
public void onCompleted(Response response) {
if (response.getError() != null) { // [IF Failed Posting]
Log.d("error", "photo upload problem. Error="+response.getError() );
}
else {
Log.d("error", "photo upload complete.");
}
}
});
request.executeAsync();
}
}
});
return null;
}

No comments:

Post a Comment