# Error plugin Facebook

**URL:** <https://forum.ionicframework.com/t/error-plugin-facebook/123593>\
**Category:** Ionic Native\
**Created:** [March 6, 2018, 12:34pm UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593 "2018-03-06T12:34:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![homeres](https://avatars.discourse-cdn.com/v4/letter/h/d9b06d/32.png) [@homeres](https://forum.ionicframework.com/u/homeres)\
**Post date:** [March 6, 2018, 12:34pm UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/1 "2018-03-06T12:34:44Z")

</div>

Hi !

i try build my app and i have this error:

```auto
 AAPT: error: resource string/fb_app_id (aka myapp:string/fb_app_id) not found.

AAPT: error: resource string/fb_app_name (aka myapp:string/fb_app_name) not found.

```

Any help please? I try the commands

- ionic cordova platform rm android
- ionic cordova platform add android
- ionic cordova build android

But the results not were succesfully

cordova: 8.0.0  
cordova-android: 7.0.0  
android-target: android-26  
plugin-facebook4: 1.9.1

---

<div class="post-metadata">

**Author:** ![vibinflogesoft](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vibinflogesoft/32/117525_2.png) [@vibinflogesoft](https://forum.ionicframework.com/u/vibinflogesoft)\
**Post date:** [March 6, 2018, 12:42pm UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/2 "2018-03-06T12:42:05Z")

</div>

Hi@homeres  
This issue is related with your facebook appid and appname  
Try to add the right appid and appname while installing the plugin

```auto
ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="Your APPID" --variable APP_NAME="Your APPNAME"

```

---

<div class="post-metadata">

**Author:** ![homeres](https://avatars.discourse-cdn.com/v4/letter/h/d9b06d/32.png) [@homeres](https://forum.ionicframework.com/u/homeres)\
**Post date:** [March 6, 2018, 10:18pm UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/3 "2018-03-06T22:18:07Z")

</div>

Thanks for your response @vibinflogesoft .  
I checked my appid and my appname and it’s right

---

<div class="post-metadata">

**Author:** ![sunojvijayan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sunojvijayan](https://forum.ionicframework.com/u/sunojvijayan)\
**Post date:** [May 25, 2018, 5:14am UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/4 "2018-05-25T05:14:52Z")

</div>

Same thing here. Did you find the problem?

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [May 25, 2018, 5:52am UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/5 "2018-05-25T05:52:56Z")

</div>

See documentation for cordova-android \>= v7

> <https://github.com/jeduan/cordova-plugin-facebook4/blob/master/docs/android/README.md>

---

<div class="post-metadata">

**Author:** ![sunojvijayan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sunojvijayan](https://forum.ionicframework.com/u/sunojvijayan)\
**Post date:** [May 25, 2018, 6:32am UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/6 "2018-05-25T06:32:39Z")

</div>

The easiest solution is to

Add string resources into (I am using linux ubuntu this is my ionic project path) file : /home/user/js/fb4/platforms/android/app/src/main/res/values/strings.xml

```auto
<string name="fb_app_id">59523234234</string>
<string name="fb_app_name">hajmo.ba</string>

```

and my project now works!

As mentioned here

> [@Can't install facebook connect plugin on Android platform](https://forum.ionicframework.com/t/cant-install-facebook-connect-plugin-on-android-platform/17721/6):
>
> Most of the steps described in the doc did not work for me, here is what i have done to solve this issue Configure the project with your FB app id in the res/values/facebookconnect.xml file. For example: \<resources\> \<string name="fb\_app\_id"\>123456789\</string\> \<string name="fb\_app\_name"\>TEST\</string\> \</resources\> Then, type in your terminal the following commands: (I did not run that, the platform was already installed) cordova platform add android cordova -d plugin add ht…

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [May 25, 2018, 11:37am UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/7 "2018-05-25T11:37:43Z")

</div>

@sunojvijayan if you go that way, don’t forget that next time you will remove/add your platform you will have to enter these keys again

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:48pm UTC](https://forum.ionicframework.com/t/error-plugin-facebook/123593/8 "2021-07-19T21:48:06Z")

</div>

Closed on July 19, 2021, 9:48pm UTC


