code: public void loginWithOAuth(String serviceName, String accessToken) {
          sendOAuthHTTPRequest(serviceName, accessToken, randomSecret(), new Response.Listener<String>(){
              @Override
              public void onResponse(String response) {
                  //json is stored inside an html object in the response
                  Matcher matcher = Pattern.compile("<div id=\"config\" style=\"display:none;\">(.*?)</div>").matcher(response);
                  try {
                      JSONObject jsonResponse = new JSONObject(matcher.group(1));
  
                      Map<String, Object> options = new HashMap<>();
                      Map<String, String> oauth = new HashMap<>();
                      oauth.put("credentialSecret", (String) jsonResponse.get("credentialSecret"));
                      oauth.put("credentialToken", (String) jsonResponse.get("credentialToken"));
                      options.put("oauth", oauth);
  
                      Object[] methodArgs = new Object[1];
                      methodArgs[0] = options;
  
                      getDDP().call("login", methodArgs, new DDPListener() {
                          @Override
                          public void onResult(Map<String, Object> jsonFields) {
                              if (BuildConfig.DEBUG) {
                                  log.debug(jsonFields.toString());
                              }
                              handleLoginResult(jsonFields);
                          }
                      });
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
              }
          });
      }
docs: Logs in using access token -- this breaks the current convention,
  but the method call is dependent on some of this class's variables
  @param serviceName service name i.e facebook, google
  @param accessToken short-lived one-time code received, or long-lived access token for Facebook login
  For some logins, such as Facebook, login with OAuth may only work after customizing the accounts-x packages,
  until meteor decides to change the packages themselves.
  use https://github.com/jasper-lu/accounts-facebook-ddp and
  https://github.com/jasper-lu/facebook-ddp for reference
  
  If an sdk only allows login returns long-lived token, modify your accounts-x package,
  and add the service to the accessTokenServices list