@ng-solid/facebook
TypeScript icon, indicating that this package has built-in type declarations

6.0.1 • Public • Published

Facebook Integration

NPM version

A library of Facebook UI components for Angular

Components

  • Login button (provides user information and signed request)
  • Like button (developing)
  • Share button (developing)

Installation

$ ng new PROJECT_NAME
$ cd PROJECT_NAME
$ ng add @ng-solid/facebook

You can also install @ng-solid/facebook with npm or yarn

Usage

Import the component module you want to use in your app.module.ts file and feature modules.

import { NsFacebookModule } from '@ng-solid/facebook';

@NgModule({
  imports: [
    NsFacebookModule.forRoot({
      appId: '{api-id}',
      cookie: true,
      xfbml: true,
      version: '{api-version}'
    })
  ]
})
export class AppModule
{
}

Login button

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-component',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.scss' ]
})
export class AppComponent implements OnInit
{
  constructor() {}

  ngOnInit()
  {
  }

  onLogin(status: fb.StatusResponse)
  {
  }
}

Add this to your template:

<ns-facebook-login [rounded]="true" (onLogin)="onLogin($event)">Continue with Facebook</ns-facebook-login>

Package Sidebar

Install

npm i @ng-solid/facebook

Weekly Downloads

0

Version

6.0.1

License

MIT

Unpacked Size

134 kB

Total Files

23

Last publish

Collaborators

  • chicromedia