zyra / ngx-facebook

Angular TypeScript Wrapper for Facebook SDK
http://zyra.github.io/ngx-facebook/
MIT License
209 stars 70 forks source link

facebook comments ! #73

Open OdaiTu opened 7 years ago

OdaiTu commented 7 years ago

hi there is no facebook comments or what guys ?

ihadeed commented 7 years ago

Hey there,

See https://zyra.github.io/ngx-facebook/comments/

OdaiTu commented 7 years ago

@ihadeed i see it but when i write <fb-comments></fb-comments>

no thing show

i try to use it like this <fb-comments [numposts]="'5'" [href]="'https://www.watania.net/news/'+ selectednews[0].id+'-'+selectednews[0].seo_name"> </fb-comments>

nothing show also im using forRoot Module

OdaiTu commented 7 years ago

@ihadeed

ihadeed commented 7 years ago

@OdaiTu

I haven't tested everything thoroughly in all kinds of situations. I mainly test things in the example project here: https://zyra.github.io/ngx-facebook-example/

As you can see, the comments are displaying properly there without any issues. You can see the source code here https://github.com/zyra/ngx-facebook-example/blob/master/src/app/app.component.html#L82

If you are experiencing issues and would like some help, please help me help you by creating an example project that reproduces the issues that you are having.

OdaiTu commented 7 years ago

@ihadeed problem resolved and the plugin comes up but i think the main problem still there im using a component to preview a news so its one component and the user when open this component for first time the comments plugin shows but it he decide to navigate between components and back to news compoentn the comments plugin gone and if i open a new news when im still in the same compoenet the comment still the same !

OdaiTu commented 7 years ago

@ihadeed

the code just fine but still this issue that if i leave the component or click new item in the same component can you resolved it

our company finish the project but still this proplem bro !

thank you for your time

OdaiTu commented 7 years ago

@ihadeed

here is my code 👍 https://drive.google.com/open?id=0Bxp7VVaVN1DqbHZLOERyanhYdm8

here is in live

http://zaina.mezian.co/news/102802

frdrcklopez commented 6 years ago

I'll leave it here.

import { OnDestroy } from '@angular/core'; then after assigning the facebook SDK to the constructor try to include the init inside the constructor

this.fB.initFacebook(facebook.developement);

then on the destroy the fB

ngOnDestroy() { this.fB; }