Package com.facebook.capi.sdk
Class ParamBuilder
java.lang.Object
com.facebook.capi.sdk.ParamBuilder
Core function to help process Conversions API params
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for ParamBuilder.ParamBuilder(ETLDPlusOneResolver etldPlus1Resolver) Constructor for ParamBuilder.ParamBuilder(List<String> domainList) Constructor for ParamBuilder. -
Method Summary
Modifier and TypeMethodDescriptionReturn a list of CookieSttings Only return the cookies we recommended to update.getFbc()Return fbc valuegetFbp()Return fbp valueProcess and provide recommended cookies to save.processRequest(String host, Map<String, String[]> queries, Map<String, String> cookies, String referrer) Process and provide recommended cookies to save.protected voidsetCookieUtils(List<FbcParamConfig> fbcParamConfigs) For unit test only
-
Constructor Details
-
ParamBuilder
Constructor for ParamBuilder. The domainlist helps provide more accurate results for CookieSetting's domain value- Parameters:
domainList- list of ETLD+1 associated with website URLs
-
ParamBuilder
Constructor for ParamBuilder. The customized ETLD+1 resolver helps provide more accurate results for CookieSetting's domain value- Parameters:
etldPlus1Resolver- customized etldPlus1Resolver which implement the interface of ETLDPlusOneResolver
-
ParamBuilder
public ParamBuilder()Constructor for ParamBuilder. Prefered domainList or ETLD+1 option for more accurate result
-
-
Method Details
-
setCookieUtils
For unit test only- Parameters:
fbcParamConfigs- configs
-
processRequest
public List<CookieSetting> processRequest(String host, Map<String, String[]> queries, Map<String, String> cookies) Process and provide recommended cookies to save.- Parameters:
host- Current full url. eg. test.example.comqueries- Current query params in map formatcookies- Current cookies in map format- Returns:
- A list of CookieSettings recommended to save
-
processRequest
public List<CookieSetting> processRequest(String host, Map<String, String[]> queries, Map<String, String> cookies, String referrer) Process and provide recommended cookies to save.- Parameters:
host- Current full url. eg. test.example.comqueries- Current query params in map formatcookies- Current cookies in map formatreferrer- Full url with query params from referrer.- Returns:
- A list of CookieSettings recommended to save
-
getCookiesToSet
Return a list of CookieSttings Only return the cookies we recommended to update. If you already have the cookie properly set, no need to update. It won't get returned here.- Returns:
- list of CookieSetting
-
getFbc
Return fbc value- Returns:
- fbc
-
getFbp
Return fbp value- Returns:
- fbp
-