Git Product home page Git Product logo

Comments (6)

ihadeed avatar ihadeed commented on June 3, 2024

@rodneyjoyce no it doesn't. I just had a quick look at the link. It seems like they just require you to add an HTML markup. I don't see why an Angular 2 service/component is needed here.

from ngx-facebook.

rodneyjoyce avatar rodneyjoyce commented on June 3, 2024

@ihadeed : I tried to embed the HTML but it does not render. In Angular1 I was using a NPM library that rendered it correctly. I had the same issue with the AddThis widget.

from ngx-facebook.

ihadeed avatar ihadeed commented on June 3, 2024

@rodneyjoyce can you send me a link of the library so I can have a look at what they did and try to replicate it for Angular 2?

from ngx-facebook.

rodneyjoyce avatar rodneyjoyce commented on June 3, 2024

Ok, so the library that I was using for ng1 and Facebook was this one: https://github.com/pc035860/angular-easyfb

from ngx-facebook.

ihadeed avatar ihadeed commented on June 3, 2024

Sorry for the long delay @rodneyjoyce

I'm currently working on v2 of this module. The work is being done in the v2 branch in this repo.

So far I added fb-page, fb-like and fb-follow components. I will add the rest of them soon.

You can see examples in the ng2-facebook-sdk-example repo. Or try it yourself:

Install with @next tag.

npm i --save ng2-facebook-sdk@next

Remove FacebookService and add FacebookModule in your NgModule

import { FacebookModule } from 'ng2-facebook-sdk';
@NgModule({
  imports: [FacebookModule]
})

All previous code should work the same way. The only change is that the interfaces no longer have the Facebook prefix, and the Ui prefix is now UI.

To try out the components, do the following:

<fb-like href="path/to/site/or/page"></fb-like>
<fb-follow ...></fb-follow>
<fb-page ...></fb-page>

The components accept all attributes documented on the Facebook SDK site here: https://developers.facebook.com/docs/plugins
There are two differences in the names:

  • all attribute names use camel caps instead of dashes, example show-faces is showFaces
  • all attribute name do not have data- prefix

I would love to hear some feedback. Any issues, suggestions, questions .. etc

Thanks!

from ngx-facebook.

ihadeed avatar ihadeed commented on June 3, 2024

Closing this issue, opened a discussion/progress tracker here: #53

from ngx-facebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.