facebook

package
v0.0.0-...-9b96405 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFields = []string{
	"id",
	"email",
	"first_name",
	"middle_name",
	"last_name",
	"gender",
	"name",
	"profile_pic",
}
View Source
var Server = fetch.Server{
	Host:    "https://graph.facebook.com",
	Headers: http.Header{},
}

Functions

This section is empty.

Types

type App

type App struct {
	ID      string
	Key     string
	Clients fetch.Clients
}

func (*App) GetAccessToken

func (a *App) GetAccessToken(code string, redirect_url string) (*ResultAPIAccessToken, error)

func (*App) GetUser

func (a *App) GetUser(accessToken string) (*ResultAPIUser, error)

type ResultAPIAccessToken

type ResultAPIAccessToken struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

type ResultAPIUser

type ResultAPIUser struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	FirstName  string `json:"first_name"`
	MiddleName string `json:"middle_name"`
	LastName   string `json:"last_name"`
	Gender     string `json:"gender"`
	Name       string `json:"name"`
	ProfilePic string `json:"profile_pic"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL