Facebook.access_token
You're seeing just the function
access_token
, go back to Facebook module for more information.
Specs
access_token(client_id(), client_secret(), String.t(), String.t()) :: resp()
Exchange an authorization code for an access token.
If you are implementing user authentication, the code
is generated from a Facebook
endpoint which is outside of the Graph API. Please see the
Manually Build a Login Flow
documentation for more details.
Examples
iex> Facebook.access_token("client_id", "client_secret", "redirect_uri", "code")
{:ok, %{
"access_token" => access_token,
"expires_in" => 5183976,
"token_type" => "bearer"
}}
See: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#confirm