我想在用户的墙上发布照片。我在onCompleted()
函数中给出了一条错误消息。当我运行我的应用程序时,logCat 显示照片上传完成..但我的墙上没有显示上传的照片..错误在哪里..请指导我..这是我的代码-
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;
}