I have a simple problem (maybe) with my code... I have a facebook button that will open the login dialog for the user, which works fine. but if there is no internet it'll take forever and I don't know how to timeout it... I've put it in a 'try' block, but it still takes way too long
this is the code for it
try{
facebook.authorize(this,new String[] {"publish_stream", "read_stream", "offline_access"}, new DialogListener() {
@Override
public void onComplete(Bundle values) {}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
} catch(Exception e) {
e.printStackTrace();
}
any help will be highly appreciated
P.S. this applies for the post into facebook as well