docs: @Deprecated
      public static String openUrl(String url, String method, Bundle params)
            throws MalformedURLException, IOException {
          // random string as boundary for multi-part http post
          String strBoundary = "3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f";
          String endLine = "\r\n";
  
          OutputStream os;
  
          if (method.equals("GET")) {
              url = url + "?" + encodeUrl(params);
          }
          Utility.logd("Facebook-Util", method + " URL: " + url);
          HttpURLConnection conn =
              (HttpURLConnection) new URL(url).openConnection();
          conn.setRequestProperty("User-Agent", System.getProperties().
                  getProperty("http.agent") + " FacebookAndroidSDK");
          if (!method.equals("GET")) {
              Bundle dataparams = new Bundle();
              for (String key : params.keySet()) {
                  Object parameter = params.get(key);
                  if (parameter instanceof byte[]) {
                      dataparams.putByteArray(key, (byte[])parameter);
                  }
              }
  
              // use method override
              if (!params.containsKey("method")) {
                  params.putString("method", method);
              }
  
              if (params.containsKey("access_token")) {
                  String decoded_token =
                      URLDecoder.decode(params.getString("access_token"));
                  params.putString("access_token", decoded_token);
              }
  
              conn.setRequestMethod("POST");
              conn.setRequestProperty(
                      "Content-Type",
                      "multipart/form-data;boundary="+strBoundary);
              conn.setDoOutput(true);
              conn.setDoInput(true);
              conn.setRequestProperty("Connection", "Keep-Alive");
              conn.connect();
  
              os = new BufferedOutputStream(conn.getOutputStream());
  
              try {
                  os.write(("--" + strBoundary +endLine).getBytes());
                  os.write((encodePostBody(params, strBoundary)).getBytes());
                  os.write((endLine + "--" + strBoundary + endLine).getBytes());
  
                  if (!dataparams.isEmpty()) {
  
                      for (String key: dataparams.keySet()){
                          os.write(("Content-Disposition: form-data; filename=\"" + key + "\"" + endLine).getBytes());
                          os.write(("Content-Type: content/unknown" + endLine + endLine).getBytes());
                          os.write(dataparams.getByteArray(key));
                          os.write((endLine + "--" + strBoundary + endLine).getBytes());
  
                      }
                  }
                  os.flush();
              } finally {
                  os.close();
              }
          }
  
          String response = "";
          try {
              response = read(conn.getInputStream());
          } catch (FileNotFoundException e) {
              // Error Stream contains JSON that we can parse to a FB error
              response = read(conn.getErrorStream());
          }
          return response;
      }
  
      @Deprecated
      private static String read(InputStream in) throws IOException {
          StringBuilder sb = new StringBuilder();
          BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);
          for (String line = r.readLine(); line != null; line = r.readLine()) {
              sb.append(line);
          }
          in.close();
          return sb.toString();
      }
  
      /**
       * Parse a server response into a JSON Object. This is a basic
       * implementation using org.json.JSONObject representation. More
       * sophisticated applications may wish to do their own parsing.
       *
       * The parsed JSON is checked for a variety of error fields and
       * a FacebookException is thrown if an error condition is set,
       * populated with the error message and error type or code if
       * available.
       *
       * @param response - string representation of the response
       * @return the response as a JSON Object
       * @throws JSONException - if the response is not valid JSON
       * @throws FacebookError - if an error condition is set
       */
      @Deprecated
      public static JSONObject parseJson(String response)
            throws JSONException, FacebookError {
          // Edge case: when sending a POST request to /[post_id]/likes
          // the return value is 'true' or 'false'. Unfortunately
          // these values cause the JSONObject constructor to throw
          // an exception.
          if (response.equals("false")) {
              throw new FacebookError("request failed");
          }
          if (response.equals("true")) {
              response = "{value : true}";
          }
          JSONObject json = new JSONObject(response);
  
          // errors set by the server are not consistent
          // they depend on the method and endpoint
          if (json.has("error")) {
              JSONObject error = json.getJSONObject("error");
              throw new FacebookError(
                      error.getString("message"), error.getString("type"), 0);
          }
          if (json.has("error_code") && json.has("error_msg")) {
              throw new FacebookError(json.getString("error_msg"), "",
                      Integer.parseInt(json.getString("error_code")));
          }
          if (json.has("error_code")) {
              throw new FacebookError("request failed", "",
                      Integer.parseInt(json.getString("error_code")));
          }
          if (json.has("error_msg")) {
              throw new FacebookError(json.getString("error_msg"));
          }
          if (json.has("error_reason")) {
              throw new FacebookError(json.getString("error_reason"));
          }
          return json;
      }