Documentation ¶
Index ¶
Constants ¶
View Source
const (
FacebookAPIMeURL = "https://graph.facebook.com/v2.9/me?locale=en_US&fields=name,email,verified,first_name,middle_name,last_name"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientUtil ¶
type ClientUtil struct { Client *http.Client User FacebookUserinfo `json:"user,omitempty"` }
ClientUtil is a client library to retrieve user info from the Facebook API.
func NewClientUtil ¶
func NewClientUtil(client *http.Client) ClientUtil
func (*ClientUtil) GetSCIMUser ¶
func (apiutil *ClientUtil) GetSCIMUser() (scim.User, error)
func (*ClientUtil) GetUserinfo ¶
func (apiutil *ClientUtil) GetUserinfo() (FacebookUserinfo, error)
GetUserinfo retrieves the userinfo from the https://graph.facebook.com/v2.9/{user-id} endpoint.
func (*ClientUtil) SetClient ¶
func (apiutil *ClientUtil) SetClient(client *http.Client)
type FacebookUserinfo ¶
type FacebookUserinfo struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Verified bool `json:"verified,omitempty"` FirstName string `json:"first_name,omitempty"` MiddleName string `json:"middle_name,omitempty"` LastName string `json:"last_name,omitempty"` }
Click to show internal directories.
Click to hide internal directories.