Search code examples
facebookangularionic2angular2-servicesionic2-providers

Error Login facebook Angular 2


I'm trying to implement the Facebook log in my application with the following example: ng2-facebook-sdk

When redirecting to the page of facebook shows me:

Can not load the URL: The domain of this URL is not included in the domains of the application. In order to load this URL, add all domains and subdomains of your application in the "Application domains" field in the application settings.

I am working on a mobile application in Angular 2 and Ionic 2 therefore I have no domain.


Solution

  • I highly recommend using the Ionic native Facebook plugin.It has all the steps on the official doc and very easy to follow.Hence it is native you don't need to worry about the performance too.

    Here is the official doc.

    Update: You can use Graph API to request additional details.

    Profile /{profile-id}

    Getting a User's Birthday

    cordova-plugin-facebook4