android - callback issue in Facebook while user clicks anywhere while Facebook login page is loading -


i have 1 activity(login) , 1 class(facebooklogin).

public void loginwithfacebook(boolean fetchuserinfo) {  log.d(tag, "logging facebook.");  string applicationid = utility.getmetadataapplicationid(activity         .getbasecontext()); mcurrentsession = session.getactivesession(); if (mcurrentsession == null || mcurrentsession.getstate().isclosed()) {     session session = new session.builder(activity.getbasecontext())             .setapplicationid(applicationid).build();     session.setactivesession(session); } else {     log.d(tag, "session open"); } mcurrentsession = session.getactivesession();  if (!mcurrentsession.isopened()) {     session.openrequest openrequest = null;     openrequest = new session.openrequest(activity);     if (openrequest != null) {         openrequest.setdefaultaudience(sessiondefaultaudience.friends);             openrequest.setpermissions(arrays.aslist("user_birthday",                     "email", "user_hometown"));             openrequest                     .setloginbehavior(sessionloginbehavior.suppress_sso);             mcurrentsession.openforread(openrequest);       } }  

}

this method of facebook class. specified onactivityresult method in login activity. works , unless user clicks anywhere while facebook login page loading. if user clicks anywhere calls onactivityresult class. why happening?

goto oncreate() method of webdialog.java in facebooksdk library, find following statement:

  spinner = new progressdialog(getcontext()); 

add below statement after it

spinner.setcanceledontouchoutside(false); 

you ready go!


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -