UNPKG

chen-facebook

Version:
74 lines (73 loc) 1.52 kB
import { Service } from 'chen/core'; import { FacebookLogin } from './auth'; import { FacebookApi } from './api'; /** * FacebookCredentials interface */ export interface FacebookCredentials { appId: string; appSecret: string; redirectUri?: string; scope: string[]; version: string; } /** * Facebook class */ export declare class Facebook extends Service { /** * Credentials * @type {FacebookCredentials} */ private credentials; /** * FB session key * @type {string} */ private static FB_SESS_PREFIX; /** * Access token * @type {string} */ private accessToken; /** * Init hook */ init(): void; /** * Create facebook api caller * @return {FacebookApi} */ api(token?: string): FacebookApi; /** * Set App ID * @param {string} id */ setAppId(id: string): void; /** * Set App Secret * @param {string} secret */ setAppSecret(secret: string): void; getLoginHelper(redirectUri?: string): FacebookLogin; /** * Get credentials * @return {FacebookCredentials} */ getCredentials(): FacebookCredentials; /** * Get access token session key * @return {string} */ getSessionKey(name: string): string; /** * Set access token * @param {string} token */ setAccessToken(token: string): void; /** * Get access token * @return {string} */ getAccessToken(): string; }