# REALLY NEED A TUTORIAL on Facebook functionality!

**URL:** <https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576>\
**Category:** Social Media\
**Created:** [October 8, 2017, 1:53pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576 "2017-10-08T13:53:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 8, 2017, 1:53pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/1 "2017-10-08T13:53:19Z")

</div>

Okay, so I thought I had Facebook working, but I cannot get things to function correctly. &nbsp;Can anyone post sample code to do the following, which should be a simple process, but the documentation seems quite confusing:

1. Log user into Facebook

2. Get user’s Facebook ID and profile pic

3. Get list of friends (ID, profile pic) that have the app installed

4. Get list of friends to invite to the game

I have properly configured my Facebook developer account and I thought I had everything working, but requests now don’t bring back anything. &nbsp;This is the last step in getting my next app published so I really need some help here!

I see MANY comments around confusion on how to properly use the Facebook plugin, so anyone that can post sample code that accomplishes the above functionality would surely help many of our users!

Please help!!!

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 10, 2017, 12:21pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/2 "2017-10-10T12:21:45Z")

</div>

Can anyone help here?

---

<div class="post-metadata">

**Author:** ![Bektur](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/8baadc/32.png) [@Bektur](https://forums.solar2d.com/u/Bektur)\
**Post date:** [October 10, 2017, 2:30pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/3 "2017-10-10T14:30:48Z")

</div>

Have you looked at Facebook app from our Samples?

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 12, 2017, 12:05pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/4 "2017-10-12T12:05:38Z")

</div>

Yes, but it doesn’t seem to address the friends list need.&nbsp; Anyone have other examples?

---

<div class="post-metadata">

**Author:** ![nick\_sherman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/n/958977/32.png) [@nick\_sherman](https://forums.solar2d.com/u/nick_sherman)\
**Post date:** [October 12, 2017, 12:33pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/5 "2017-10-12T12:33:51Z")

</div>

I haven’t done this for a long time, but my impression was you now&nbsp;need express permission from Facebook to access things like friends lists. Have you been through that process to have your app’s permissions approved?

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 12, 2017, 12:59pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/6 "2017-10-12T12:59:59Z")

</div>

Yes, everything is set up on the Facebook developer portal.

---

<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:** [October 12, 2017, 3:28pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/7 "2017-10-12T15:28:24Z")

</div>

Facebook works with API endpoints they call their “Graph API”. They have extensive documentation on using their API calls. In theory, you would do a “me/friends” facebook.request() call to get what you need.

However, Facebook over the years has changed the rules and some things require additional permissions. They also in an attempt to prevent spamming users with game requests, broken friends in to friends with your app and friends without it.&nbsp; While in “testing” mode you should have access to everything, but once you’re ready to go live, you will have to get those activities approved by Facebook.

There are also facebook.showDialog() calls that can get these friend lists for you.

Rob

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 10, 2017, 12:21pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/8 "2017-10-10T12:21:45Z")

</div>

Can anyone help here?

---

<div class="post-metadata">

**Author:** ![Bektur](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/b/8baadc/32.png) [@Bektur](https://forums.solar2d.com/u/Bektur)\
**Post date:** [October 10, 2017, 2:30pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/9 "2017-10-10T14:30:48Z")

</div>

Have you looked at Facebook app from our Samples?

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 12, 2017, 12:05pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/10 "2017-10-12T12:05:38Z")

</div>

Yes, but it doesn’t seem to address the friends list need.&nbsp; Anyone have other examples?

---

<div class="post-metadata">

**Author:** ![nick\_sherman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/n/958977/32.png) [@nick\_sherman](https://forums.solar2d.com/u/nick_sherman)\
**Post date:** [October 12, 2017, 12:33pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/11 "2017-10-12T12:33:51Z")

</div>

I haven’t done this for a long time, but my impression was you now&nbsp;need express permission from Facebook to access things like friends lists. Have you been through that process to have your app’s permissions approved?

---

<div class="post-metadata">

**Author:** ![zolnier](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zolnier](https://forums.solar2d.com/u/zolnier)\
**Post date:** [October 12, 2017, 12:59pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/12 "2017-10-12T12:59:59Z")

</div>

Yes, everything is set up on the Facebook developer portal.

---

<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:** [October 12, 2017, 3:28pm UTC](https://forums.solar2d.com/t/really-need-a-tutorial-on-facebook-functionality/345576/13 "2017-10-12T15:28:24Z")

</div>

Facebook works with API endpoints they call their “Graph API”. They have extensive documentation on using their API calls. In theory, you would do a “me/friends” facebook.request() call to get what you need.

However, Facebook over the years has changed the rules and some things require additional permissions. They also in an attempt to prevent spamming users with game requests, broken friends in to friends with your app and friends without it.&nbsp; While in “testing” mode you should have access to everything, but once you’re ready to go live, you will have to get those activities approved by Facebook.

There are also facebook.showDialog() calls that can get these friend lists for you.

Rob
