# @types/ng-facebook

> TypeScript definitions for ng-facebook

Latest version **0.0.26** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ng-facebook
pnpm add @types/ng-facebook
yarn add @types/ng-facebook
bun add @types/ng-facebook
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.26 |
| Published | 2023-11-21 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/ng-facebook
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ng-facebook
- npm.io page: https://npm.io/package/@types/ng-facebook

## Dependencies (2)

- [@types/angular](https://npm.io/package/@types/angular.md) *
- [@types/facebook-js-sdk](https://npm.io/package/@types/facebook-js-sdk.md) *

## Recent versions

- 0.0.26 (latest) — 2023-11-21
- 0.0.22 (ts4.4) — 2020-02-04
- 0.0.21 (ts2.3) — 2017-12-12
- 0.0.19 (ts2.0) — 2016-09-19
- 0.0.25 — 2023-11-07
- 0.0.24 — 2023-10-18
- 0.0.23 — 2023-09-23
- 0.0.20 — 2017-06-15
- 0.0.18 — 2016-07-14
- 0.0.17-alpha — 2016-07-08
- 0.0.15-alpha — 2016-07-04
- 0.0.14-alpha — 2016-07-02
- 0.0.13-alpha — 2016-07-01
- 0.0.12-alpha — 2016-07-01
- 0.0.11-alpha — 2016-05-25
- … 3 more at https://npm.io/package/@types/ng-facebook/versions

## README

# Installation
> `npm install --save @types/ng-facebook`

# Summary
This package contains type definitions for ng-facebook (https://github.com/GoDisco/ngFacebook).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ng-facebook.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ng-facebook/index.d.ts)
````ts
/// <reference types="angular" />
/// <reference types="facebook-js-sdk" />

import * as angular from "angular";

declare module "angular" {
    export namespace ngFacebook {
        interface IFacebookProvider {
            setAppId(appId: string): IFacebookProvider;
            getAppId(): string;

            setVersion(version: string): IFacebookProvider;
            getVersion(): string;

            setPermissions(permissions: string | string[]): IFacebookProvider;
            getPermissions(): string;

            setCustomInit(customInit: Partial<facebook.InitParams>): IFacebookProvider;
            getCustomInit(): facebook.InitParams;
        }

        type FBUIParams =
            | facebook.ShareDialogParams
            | facebook.ShareOpenGraphDialogParams
            | facebook.AddPageTabDialogParams
            | facebook.GameRequestDialogParams
            | facebook.SendDialogParams
            | facebook.PayDialogParams
            | facebook.PaymentsLiteDialogParams
            | facebook.LiveDialogParams
            | facebook.CreateOfferDialogParams
            | facebook.LeadgenDialogParams
            | facebook.InstantExperiencesAdsDialogParams
            | facebook.InstantExperiencesPreviewDialogParams
            | facebook.CollectionAdsDialogParams;

        interface IFacebookService {
            config<T extends string | number | facebook.InitParams>(property: string): T;
            init(): void;

            setCache<T>(attr: string, val: T): void;
            getCache<T>(attr: string): T;
            clearCache(): void;

            isConnected(): boolean;
            getAuthResponse(): {};
            getLoginStatus(force?: boolean): angular.IPromise<{}>;
            login(permissions?: string, rerequest?: boolean): angular.IPromise<{}>;
            logout(): angular.IPromise<void>;

            ui(params: FBUIParams): angular.IPromise<any>;
            api(path: string): angular.IPromise<{}>;
            api(path: string, method: string): angular.IPromise<{}>;
            api(path: string, params: Object): angular.IPromise<{}>;
            api(path: string, method: string, params: Object): angular.IPromise<{}>;

            cachedApi(path: string): angular.IPromise<any>;
        }
    }
}

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/angular](https://npmjs.com/package/@types/angular), [@types/facebook-js-sdk](https://npmjs.com/package/@types/facebook-js-sdk)

# Credits
These definitions were written by [Crevil](https://github.com/Crevil).

---
_Source: https://npm.io/package/@types/ng-facebook · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
