public static Map<String,String> parseUrl(String url){
  url=url.replace("fbconnect","http");
  try {
    URL u=new URL(url);
    Map<String,String> params=decodeUrl(u.getQuery());
    params.putAll(decodeUrl(u.getRef()));
    return params;
  }
 catch (  MalformedURLException e) {
    return new HashMap<>();
  }
}

public static Map < String , String > parseUrl ( String url ) { url = url . replace ( "fbconnect" , "http" ) ; try { URL u = new URL ( url ) ; Map < String , String > params = decodeUrl ( u . getQuery ( ) ) ; params . putAll ( decodeUrl ( u . getRef ( ) ) ) ; return params ; } catch ( MalformedURLException e ) { return new HashMap < > ( ) ; } }
parse a url query and fragment parameters into a key - value bundle .
