Fixed if condition that calls facebook API in java activities