Facebook Plugin Installation failed

I cannot install the Facebook plugin. what am i doing wrong.

  1. First i did this:
    D:\apps\vgs>ionic cordova plugin add cordova-plugin-facebook-connect --variable APP_ID=“123456” --variable APP_NAME=“xyz-app”
    [ERROR] Refusing to run ionic cordova plugin inside a Capacitor project.

     In Capacitor projects, Cordova plugins are just regular npm dependencies.
     - To add a plugin, use npm i cordova-plugin-facebook-connect
     - To remove, use npm uninstall cordova-plugin-facebook-connect
  2. Second i did this:
    D:\apps\vgs>npm i cordova cordova-plugin-facebook-connect --variable APP_ID=“123456” --variable APP_NAME=“xyz-app”

npm ERR! Invalid tag name “APP_ID=123456”: Tags may not have any characters that encodeURIComponent encodes.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Marten\AppData\Roaming\npm-cache_logs\2021-05-27T06_16_44_625Z-debug.log

I use Ionic 5 with Capacitor

Is the Facebook SKD only available for Cordova? How can I implement Facebook SDK with Capacitor 2? I want to use it for App Tracking. Not just for login.

So … i have since found the solution myself. You can see it here:

Try installing plugin without variable app_id and app_name and then add your Facebook app_id and app name in this file manually :