Hi! The built-in getProfileInfo of Facebook by def...
# support-questions-legacy
h
Hi! The built-in getProfileInfo of Facebook by default use fields: "id,email", is it possible to override this function because I want to add more fields like user_gender, user_birthday to retrieve more user's info https://github.com/supertokens/supertokens-node/blob/master/lib/ts/recipe/thirdparty/providers/facebook.ts#L63
r
hey @hwihwi6108
We provide you the access token from Facebook and you can use that to query it again to get any info you like: https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/getting-provider-access-token
h
Thank you, I see it @rp_st , but the inconvenient thing here is we have to make 2 API requests to facebook for the same API, whether will there be a patch in the future such as allowing getProfileInfo of built-in provider that can receive params from outside
r
yea at the moment, it will be 2 API calls indeed. You can provide your own impl for the getProfileInfo function but the return type doesn't allow for any extra info to be passed. We are working on a fix to this where all the info from the profile API will be passed back to you. So depending on the scope, you would have all info without querying fb again. This is expected to be released sometime in Feb.
h
It's great @rp_st , that is what I expect, looking forward to see it, thank you for your very details reply 👍