Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccessToken ¶
func GetAccessToken() string
func StringFromBody ¶
Types ¶
type ChunkOffset ¶
type Error ¶
type Error struct { Struct struct { Message string `json:"message"` Type string `json:"type"` Code int `json:"190"` ErrorSubCode int `json:"463"` FBTraceID string `json:"fbtrace_id"` } `json:"error"` }
func NewErrorFromBody ¶
func NewErrorFromBody(body io.ReadCloser) *Error
type LongLivedToken ¶
type LongLivedToken struct { AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` }
func NewLongLivedTokenFromBody ¶
func NewLongLivedTokenFromBody(body io.ReadCloser) *LongLivedToken
type LongLivedTokenGenerater ¶
type LongLivedTokenGenerater struct { ClientID string ClientSecret string RedirectURL string // contains filtered or unexported fields }
func NewLongLivedTokenGenerater ¶
func NewLongLivedTokenGenerater(clientID, clientSecret, redirectURL string) *LongLivedTokenGenerater
func (*LongLivedTokenGenerater) GenerateLongLivedToken ¶
func (g *LongLivedTokenGenerater) GenerateLongLivedToken(shortToken string) (string, error)
GenerateLongLivedToken generate a long-lived token from the short token.
func (*LongLivedTokenGenerater) RefreshLongLivedToken ¶
func (g *LongLivedTokenGenerater) RefreshLongLivedToken(longLivedToken string) (string, error)
RefreshLongLivedToken get a new long-lived token from an old long-lived token.
type Privacy ¶
type Privacy struct { Value PrivacyValue `json:"value"` Allow string `json:"allow"` Deny string `json:"deny"` }
type PrivacyValue ¶
type PrivacyValue string
PrivacyValue Determines the privacy settings of the video. If not supplied, this defaults to the privacy level granted to the app in the Login Dialog. This field cannot be used to set a more open privacy setting than the one granted.
const ( PrivacyEveryOne PrivacyValue = "EVERYONE" PrivacyAllFriends PrivacyValue = "ALL_FRIENDS" PrivacyFriendsOfFriends PrivacyValue = "FRIENDS_OF_FRIENDS" PrivacyCustom PrivacyValue = "CUSTOM" PrivacySelf PrivacyValue = "SELF" )
type SessionInfo ¶
type SessionInfo struct { *ChunkOffset UploadSessionID string `json:"upload_session_id"` VideoID string `json:"video_id"` }
type UploadSession ¶
type UploadSession struct { // ID of a fb resource, possible value are user, page, event, group. ID string // AccessToken the token has permission to upload video to the fb resource. AccessToken string // Endpoint url to upload video Endpoint string Transport http.RoundTripper // FilePath location of the file in disk FilePath string // contains filtered or unexported fields }
UploadSession facebook upload session struct
func NewUploadSession ¶
func NewUploadSession(filePath string, fbResourceID string, accessToken string) *UploadSession
NewUploadSession create a new fb upload session.
Click to show internal directories.
Click to hide internal directories.