Search Unity

Facebook App Invite Setup

Discussion in 'Scripting' started by siddharth3322, Jul 24, 2018.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    I want to send app invite, so as per current Facebook SDK version its supported or not because I found deprecation related message on their website.

    https://developers.facebook.com/docs/unity/reference/current/FB.Mobile.AppInvite
    https://developers.facebook.com/docs/archive/docs/app-invites/overview/

    If its deprecated and removed soon from Facebook SDK, then what is alternative way for sending App Invite?

    For Facebook App Invite, I want to setup my custom UI layout rather than Facebook default UI, is this possible? Can you able to give me help into this? Sketch for my designed layout is here:

    Dodgels Friend 1.png

    App Invite related code, I found from here so that Facebook dialog box can loaded.

     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    The new changes do not allow your own UI anymore. You can only use the FB dialog. We had to drop our custom layout and now the button in our game simply brings up FB's dialog.
     
    siddharth3322 likes this.
  3. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    After your reply, I have following questions:

    1. Basically Facebook App Invite at present working or not ?because its showing deprecated...
    2. I want to create custom layout so how can I create that ??
    3. Default Facebook invite dialog is only solution into this ?
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    1. You can not use the old invite. We are using this at the moment
    Code (csharp):
    1.  
    2. FB.AppRequest("Message", null, null, null, null, null, "Message", AppRequestHandler);
    3.  
    You can look up what all the different parameters are.

    2. No, I just said FB no longer allows your own invite dialog.
    3. Yes, it's the only solution I have found
     
  5. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Then what about this approach...

    First let me list all friends list in screen with each having Invite button as like my above screenshot.
    Then which ever person's Invite button get clicked send AppRequest to him...

    what is your suggestion about this?

    Through this way I can able to create my custom layout as well.

    @Brathnann thanks for you side awesome suggestions :)
     
  6. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    I don't think you understand. You can no longer get invitable friends. You don't have access to this feature. You can still access friends with the proper permission, but if the person doesn't play your game, you have no access to them anymore. This is why you have to use Facebooks dialog box.

    You will no longer be able to create your own dialog and populate it with people who don't play your game, even if they are friends of a person who does play your game.
     
  7. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Let me clarify your message more clearly:

    • Basically you are saying, I can't able to retrieve all friends of game play, am I right?

    Otherwise I was thinking to use this way to retrieve all friends list:
    https://stackoverflow.com/questions/18805769/access-friend-list-from-facebook-in-unity

    • I want to apply for this permission in Facebook user_friends so as per your saying, I can able to retrieve friends list who have downloaded and logged into my game ??
    • Following way is correct for me to show Friends invite dialog box and then send invitation. After this retrieve list of friends who installed the game?

    facebook_game_invite.png

    • If above approach is correct then what to put in Uri? because my game still not published, I was developing it and still may be take few days.
    Please give me some suggestion regarding above questions :)
     
  8. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    @Brathnann can you please reply me for my above questions?
    After this I will be crystal clear for implementation.
     
  9. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    The only thing I can tell you is that post was from long ago and Facebook has changed how things work, so the code doesn't look familiar for the current FB sdk.
     
  10. ostap111

    ostap111

    Joined:
    Sep 14, 2018
    Posts:
    3
    1. People tend to login less into apps with FB, if there's a way to use the app without it.
    2. Facebook not just deprecated AppInvites APIs. They now also require a review process if you need friends permission.

    @siddharth3322 you can just build your own friend system, which would let people invite their friends through multiple channels and not just FB (whatsapp, sms, twitter, fb messenger, etc), and build friend relationships on top of that.

    We've built a system called GetSocial Smart Invites for this (example video). It lets you grow organically not just with FB. And you can customize the UI as well in any way you want.

    Disclaimer: I work at GetSocial. Here's our asset on the store.
     
  11. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    Thank you for clearing many points - definitely I will check given assets.
     
    ostap111 likes this.
  12. yussufshadipoor

    yussufshadipoor

    Joined:
    Nov 3, 2018
    Posts:
    2
  13. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
  14. babji3

    babji3

    Joined:
    May 28, 2015
    Posts:
    179
    Hi did you solve the issue?