48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
|
|
export interface FacebookLoginResponse {
|
||
|
|
accessToken: string;
|
||
|
|
userID: string;
|
||
|
|
expiresIn: number;
|
||
|
|
signedRequest: string;
|
||
|
|
graphDomain: string;
|
||
|
|
data_access_expiration_time: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FacebookLoginError {
|
||
|
|
error: string;
|
||
|
|
errorDescription: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FacebookUser {
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
email?: string;
|
||
|
|
picture?: {
|
||
|
|
data: {
|
||
|
|
url: string;
|
||
|
|
width: number;
|
||
|
|
height: number;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
error?: any;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FacebookSDKInitOptions {
|
||
|
|
appId: string;
|
||
|
|
version?: string;
|
||
|
|
cookie?: boolean;
|
||
|
|
xfbml?: boolean;
|
||
|
|
autoLogAppEvents?: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
declare global {
|
||
|
|
interface Window {
|
||
|
|
FB: {
|
||
|
|
init: (options: FacebookSDKInitOptions) => void;
|
||
|
|
login: (callback: (response: any) => void, options?: { scope: string }) => void;
|
||
|
|
logout: (callback: (response: any) => void) => void;
|
||
|
|
getLoginStatus: (callback: (response: any) => void) => void;
|
||
|
|
api: (path: string, params: any, callback: (response: any) => void) => void;
|
||
|
|
};
|
||
|
|
fbAsyncInit: () => void;
|
||
|
|
}
|
||
|
|
}
|