# Facebook library loading fail

**URL:** <https://forums.solar2d.com/t/facebook-library-loading-fail/322370>\
**Category:** Social Media\
**Created:** [February 10, 2014, 3:57pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370 "2014-02-10T15:57:48Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![gjaman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gjaman](https://forums.solar2d.com/u/gjaman)\
**Post date:** [February 26, 2014, 3:38am UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/21 "2014-02-26T03:38:16Z")

</div>

I had tried most devices.&nbsp;

Example - iphone retina (3.5), iOS 7.0.3. &nbsp;Loaded facebook app

console

```
Feb 25 19:35:42 Gregs-MacBook-Air.local Facebook[14167] \<Notice\>: BUG in libdispatch: 13B42 - 866 - 0x2 Feb 25 19:35:42 Gregs-MacBook-Air.local Facebook[14167] \<Notice\>: BUG in libdispatch client: kevent[EVFILT\_VNODE] add: "Bad file descriptor" - 0x9 Feb 25 19:35:42 Gregs-MacBook-Air.local Facebook[14167] \<Warning\>: Platform: iPhone Simulator / x86\_64 / 7.0.3 / Apple Software Renderer / OpenGL ES 2.0 APPLE-9.2.1 Feb 25 19:35:42 Gregs-MacBook-Air.local lsd[14137] \<Warning\>: LaunchServices:(called by PID 14167) Identifiers file does not exist. Feb 25 19:35:42 Gregs-MacBook-Air.local lsd[14137] \<Warning\>: LaunchServices:(called by PID 14167) Creating new identifiers file. Feb 25 19:35:42 Gregs-MacBook-Air.local Facebook[14167] \<Warning\>: Runtime error module 'facebook' not found:resource (facebook.lu) does not exist in archive no field package.preload['facebook'] no file '/Users/greg/Library/Application Support/iPhone Simulator/7.0.3/Applications/B6EE78B9-F84A-40D2-8D0D-0004C36357EB/Facebook.app/facebook.lua' no file '/Users/greg/Library/Application Support/iPhone Simulator/7.0.3/Applications/B6EE78B9-F84A-40D2-8D0D-0004C36357EB/Facebook.app/facebook.lua' no file './facebook.so' no file '/Users/greg/Library/Application Support/iPhone Simulator/7.0.3/Applications/B6EE78B9-F84A-40D2-8D0D-0004C36357EB/Facebook.app/facebook.so'facebook stack traceback: [C]: in function 'require' ?: in function 'require' ?: in main chunk
```

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [February 26, 2014, 3:54am UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/22 "2014-02-26T03:54:10Z")

</div>

Have you added facebook as a plugin yet?&nbsp; This is a change required for iOS.

Rob

---

<div class="post-metadata">

**Author:** ![gjaman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gjaman](https://forums.solar2d.com/u/gjaman)\
**Post date:** [February 26, 2014, 4:25am UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/23 "2014-02-26T04:25:31Z")

</div>

Do I need to do anything beyond including it in the build.settings?

The sample apps build.settings:

```
plugins = { -- key is the name passed to Lua's 'require()' This section is only required for builds \> 2014.2165 ["facebook"] = { -- required publisherId = "com.coronalabs", supportedPlatforms = { iphone = true }, }, },

```

From&nbsp;[http://docs.coronalabs.com/guide/social/implementFacebook/](http://docs.coronalabs.com/guide/social/implementFacebook/) :&nbsp;

```
settings = { plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.native.popup.social"] = { -- required publisherId = "com.coronalabs", }, }, }
```

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [February 26, 2014, 11:20pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/24 "2014-02-26T23:20:23Z")

</div>

The social plugin is a different beast than the facebook library.&nbsp; They are different plugins.&nbsp; If you’re not using Facebook through the social plugin, then you only need the facebook one.&nbsp; If you are not calling facebook.login() in your code but are only using native.showPopUp() then you need the social version, not the facebook only version.

Rob

---

<div class="post-metadata">

**Author:** ![gjaman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gjaman](https://forums.solar2d.com/u/gjaman)\
**Post date:** [February 26, 2014, 11:42pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/25 "2014-02-26T23:42:44Z")

</div>

Is there anything I can do to fix the issue i’m having in the iOS simulator?

```
 module 'facebook' not found:resource (facebook.lu) does not exist in archive

```

Can I find a copy of the facebook.lu file and place it in my project directly to get me over this hurdle?

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [February 26, 2014, 11:47pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/26 "2014-02-26T23:47:32Z")

</div>

No, there isn’t a facebook.lu file (it’s really facebook.lua, but…)&nbsp; You have to get it from the plugin.&nbsp; Can you post your build.settings for me?

---

<div class="post-metadata">

**Author:** ![gjaman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gjaman](https://forums.solar2d.com/u/gjaman)\
**Post date:** [February 27, 2014, 3:31am UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/27 "2014-02-27T03:31:28Z")

</div>

I just downloaded the latest daily build (2187) and used the sample facebook app. &nbsp;I edited the build.settings and inserted my faceookAppID. &nbsp;I then modified mail.lua and added my appID and apiKey.

The build.settings are exactly the same as the sample app provided with the SDK, except for the proper appID

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [February 28, 2014, 10:38pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/28 "2014-02-28T22:38:53Z")

</div>

Apparently the iOS simulator is considered a different platform.&nbsp; Add this to your plugin block:

supportedPlatforms = { iphone = true, [“iphone-sim”] = true },

Rob

---

<div class="post-metadata">

**Author:** ![bjsorrentino](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/838e76/32.png) [@bjsorrentino](https://forums.solar2d.com/u/bjsorrentino)\
**Post date:** [February 10, 2014, 6:57pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/29 "2014-02-10T18:57:02Z")

</div>

Hi @kirumbik,

Are you using Corona daily build #2165 or later? If so, you need to include Facebook as a plugin. We had to do this because of a recent change in Apple’s approval policies.

Just include this in your “build.settings” file and Facebook should work as normal:

[lua]

settings = {

&nbsp; &nbsp; plugins =

&nbsp; &nbsp; {

&nbsp; &nbsp; &nbsp; &nbsp; [“facebook”] =

&nbsp; &nbsp; &nbsp; &nbsp; {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publisherId = “com.coronalabs”,

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; supportedPlatforms = { iphone = true },

&nbsp; &nbsp; &nbsp; &nbsp; },

&nbsp; &nbsp; },

}

[/lua]

Best regards,

Brent

---

<div class="post-metadata">

**Author:** ![kirumbik](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kirumbik](https://forums.solar2d.com/u/kirumbik)\
**Post date:** [February 10, 2014, 7:05pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/30 "2014-02-10T19:05:28Z")

</div>

Thank you for response Brent! But I’m still having the same error on simulator…

---

<div class="post-metadata">

**Author:** ![bjsorrentino](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/838e76/32.png) [@bjsorrentino](https://forums.solar2d.com/u/bjsorrentino)\
**Post date:** [February 10, 2014, 7:20pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/31 "2014-02-10T19:20:17Z")

</div>

Hi @kirumbik,

Which version of Corona? And which version of OS X?&nbsp;

---

<div class="post-metadata">

**Author:** ![kirumbik](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kirumbik](https://forums.solar2d.com/u/kirumbik)\
**Post date:** [February 10, 2014, 7:22pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/32 "2014-02-10T19:22:03Z")

</div>

> [@bjsorrentino](#):
>
> Hi @kirumbik,
> 
> Which version of Corona? And which version of OS X?&nbsp;

Corona 2014.2170, OS X 10.9

---

<div class="post-metadata">

**Author:** ![bjsorrentino](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/838e76/32.png) [@bjsorrentino](https://forums.solar2d.com/u/bjsorrentino)\
**Post date:** [February 10, 2014, 7:26pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/33 "2014-02-10T19:26:48Z")

</div>

Hmmm, this is odd. Can you restart the Simulator and then see if the problem persists?

---

<div class="post-metadata">

**Author:** ![kirumbik](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kirumbik](https://forums.solar2d.com/u/kirumbik)\
**Post date:** [February 10, 2014, 7:32pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/34 "2014-02-10T19:32:47Z")

</div>

> [@bjsorrentino](#):
>
> Hmmm, this is odd. Can you restart the Simulator and then see if the problem persists?

Yep, still the same

---

<div class="post-metadata">

**Author:** ![dchan](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/ba8739/32.png) [@dchan](https://forums.solar2d.com/u/dchan)\
**Post date:** [February 10, 2014, 9:21pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/35 "2014-02-10T21:21:18Z")

</div>

Hey,

We’ve just updated the plugin. &nbsp;Can you please try building and trying on the simulator again? &nbsp;Thanks.

---

<div class="post-metadata">

**Author:** ![whammy](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/w/94ad74/32.png) [@whammy](https://forums.solar2d.com/u/whammy)\
**Post date:** [February 11, 2014, 12:17pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/36 "2014-02-11T12:17:10Z")

</div>

@kirumbik, try to cut-n-paste the plugins table on the top of the settings table in build.settings file, before iphone or Android settings - I know it sounds strange, but I had a similar problem and this move made a trick

---

<div class="post-metadata">

**Author:** ![nahmeenstudios](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/n/bc8723/32.png) [@nahmeenstudios](https://forums.solar2d.com/u/nahmeenstudios)\
**Post date:** [March 17, 2014, 4:04pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/37 "2014-03-17T16:04:23Z")

</div>

You should really update the facebook documentation with this change. &nbsp;I was clueless until I found this post about the “iphone-sim” in the plugin block. &nbsp;The official docs do not say this.

---

<div class="post-metadata">

**Author:** ![bjsorrentino](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/838e76/32.png) [@bjsorrentino](https://forums.solar2d.com/u/bjsorrentino)\
**Post date:** [March 17, 2014, 6:47pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/38 "2014-03-17T18:47:57Z")

</div>

Hi @nahmeenstudios,

I will make the requested changes soon. Thanks for the suggestion.

Best regards,

Brent

---

<div class="post-metadata">

**Author:** ![ubj3d.android](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/u/f0a364/32.png) [@ubj3d.android](https://forums.solar2d.com/u/ubj3d.android)\
**Post date:** [March 19, 2014, 12:43pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/39 "2014-03-19T12:43:46Z")

</div>

Yes, very strange you made such a change and didn’t explain how to get the plugin.

Built for device and was getting the black screen with the loading circle.

Lost some time until I discovered this thread…

Please be more transparent when you make such changes.

---

<div class="post-metadata">

**Author:** ![ubj3d.android](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/u/f0a364/32.png) [@ubj3d.android](https://forums.solar2d.com/u/ubj3d.android)\
**Post date:** [March 19, 2014, 12:58pm UTC](https://forums.solar2d.com/t/facebook-library-loading-fail/322370/40 "2014-03-19T12:58:47Z")

</div>

What was the reason for moving it to plugin only for iOS?

[Previous page](https://forums.solar2d.com/t/facebook-library-loading-fail/322370.md?page=1)

[Next page](https://forums.solar2d.com/t/facebook-library-loading-fail/322370.md?page=3)
