zyra / ngx-facebook

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

Posts not rendered #159

Closed taketomatsunaga closed 4 years ago

taketomatsunaga commented 4 years ago

Hi, I have been develop profile page showing facebook posts. But my posts often does not render and not showing anything.

Angular CLI: 8.0.1 Node: 12.14.1 OS: linux x64 Angular: 8.0.0

in my profile page, I have following code.

<div class="tab-pane" id="facebook">
 <!-- http://localhost:10010/IMarketer/UserService/api/v1/account/2/facebook/posts failed then nothing will be rendered. -->
 <app-ifm-fb-post [fbPosts]="facebookAct?.posts"></app-ifm-fb-post>
</div>

the app-ifm-fb-post directive is below.

<div class="row">
  <div *ngFor="let fbPost of fbPosts">
    <!-- <div class="col-md-3"> -->
    <p style="color:rgba(255,0,0,0);">{{fbPost.link}}</p>
    <fb-post width=" auto" [href]="fbPost.link">
    </fb-post>
    <!-- </div> -->
  </div>
</div>

When I run the app, I can see the html codes. however nothing will be shown except post links for testing.

<div class="row"><!--bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object"
}--><div class="ng-star-inserted"><p style="color:rgba(255,0,0,0);">https://www.facebook.com/10217956357636594/posts/10218504599782305</p><fb-post width=" auto" class="fb-post" data-href="https://www.facebook.com/10217956357636594/posts/10218504599782305" data-width=" auto" ng-reflect-href="https://www.facebook.com/10217" ng-reflect-width=" auto"></fb-post></div><div class="ng-star-inserted"><p style="color:rgba(255,0,0,0);">https://www.facebook.com/10217956357636594/posts/10218501014532676</p><fb-post width=" auto" class="fb-post" data-href="https://www.facebook.com/10217956357636594/posts/10218501014532676" data-width=" auto" ng-reflect-href="https://www.facebook.com/10217" ng-reflect-width=" auto"></fb-post></div>

Could someone help me!?!?

taketomatsunaga commented 4 years ago

Can we call FB.XFBML.parse() manually using this library?

-> I used window.FB.XFBML.parse(this.facebookDiv). but issue stays.

jefcoserrca commented 4 years ago

did you resolve it?? 'cause i have the same issue, i cant rederer any facebook component in html, buut i get successfully responses of Facebook login or Facebook api using 'facebookService: FacebookService'.

taketomatsunaga commented 4 years ago

@jefcoserrca

Yes I did. Please check the following post.

https://stackoverflow.com/questions/60143423/angular-does-not-render-facebook-post-with-browser-back-forward-button

jefcoserrca commented 4 years ago

congrats! ! and thank you very much!

best regards!