facebook

package
v0.0.0-...-ea6506d Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTokenExpired

func IsTokenExpired(err error) bool

IsTokenExpired returns true if this is a token expired error from the Facebook API client.

Types

type BatchResponse

type BatchResponse struct {
	Code int    `json:"code"`
	Body string `json:"body"`
}

BatchResponse contains information about one operation in a Graph API batch request.

type Client

type Client struct {
	HTTP *http.Client
}

Client is a slimmed-down Facebook Graph API client.

func (*Client) GetEventInfo

func (f *Client) GetEventInfo(ctx context.Context, ids []string) ([]json.RawMessage, error)

GetEventInfo fetches information for up to 50 Facebook event IDs using the Facebook Graph API. If some events do not exist or are inaccessible this function may return fewer event infos than the number of ids passed in.

type Error

type Error struct {
	Message   string `json:"message"`
	Type      string `json:"type"`
	Code      int    `json:"code"`
	Subcode   int    `json:"error_subcode"`
	FBTraceID string `json:"fbtrace_id"`
}

Error is an error returned by the Facebook Graph API

func (Error) Error

func (f Error) Error() string

type ErrorResponse

type ErrorResponse struct {
	Error Error `json:"error"`
}

ErrorResponse contains an Error. It's returned by the Graph API.

Jump to

Keyboard shortcuts

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