can not invite friends with facebook.showDialog function.

Thank u very much, altafr. My code works after I add a platform of iOS on facebook. They can then got notification from Facebook app, not from webbrowser. The deep linking works well. I didn’t add a dummy setting for Facebook canvas, because my game is not for web. By the way, you code works too. Thanks again.

Cheers :) 

Hi, I want to invite friends to download my game, code is pasted below (almost same as the sample).

the problem is: it seems work correctly because log shows the response is fine, but the friends can’t receive the invitation.

other questions:

  1. how to insert a picture in the dialog? is it possible?

  2. the message text doesn’t show in the dialog, is this a bug?

thanks!

Code:

facebook.showDialog( “requests”, 

                { 

                    message = “You should download this game!”,

                    filter = “APP_NON_USERS”,

                    title = ‘Invite Friends’,

                    --link = 'https://developer.coronalabs.com/demo/hello.png’

                    --picture = 'https://developer.coronalabs.com/demo/hello.png’

                    --suggestions = scene.suggestions,                    

                })

Log:

Jul  1 15:33:38 -ouguolinde-iPad 1359 Friends[324] <Warning>: event.name:fbconnect

Jul  1 15:33:38 -ouguolinde-iPad 1359 Friends[324] <Warning>: isError: false

Jul  1 15:33:38 -ouguolinde-iPad 1359 Friends[324] <Warning>: didComplete: true

Jul  1 15:33:38 -ouguolinde-iPad 1359 Friends[324] <Warning>: event.type:dialog

Jul  1 15:33:38 -ouguolinde-iPad 1359 Friends[324] <Warning>: dialog fbconnect://success?RequestID=265206193843867&Recipient=295316080809709&Recipient=(

   295316080809709

)

Environment:

OS: Macosx 10.11.2

Corona SDK: Build: 2016.2892

Device: iPad 2 9.3.1 &iPad Mini 9.3.2

@ouguolin2013 I had exactly the same problem.

I can send out the invitations but my friends cannot receive anything.

Do you have addition permissions from Facebook?

How do you enable the “deep linking”?

Do you need an approval of Facebook’s Game Center?

Can this app request invitation dialogue work before the iOS app published? (the iPhone Store ID filled at iOS setting at Facebook is invalid)

@Corona Staff,

I’ve just release our App in New Zealand (test market) and the first thing we’ve discovered is that when the invite dialog comes up, and a gamer clicks friends to share with, Facebook (FB) properly sends us the FB IDs for those friends. But it doesn’t actually send the invites to them. This is the identical problem written about above.

The situation here is serious - we have a newly released app with a broken feature in which we have no idea why it is not working.

Do we need to go through FB App Review? Although we’ve filled out all details about our App in the FB developer dashboard, we have no clear idea on what to do to make the invite actually work.

HELP! Please?

Facebook has multiple ways of doing things. Somethings need permissions, other you don’t even need to be logged in to use. Somethings require setup, others require Facebook’s approval trough their review process. 

What will help me the most is to have you post your code where you’re trying to call whatever function you’re calling.  Please post it here. Next you should try and build our Facebook sample app that ships with Corona using your IDs, keystores and so one and see if that works for you. 

Also look in your device’s console log for errors. On Android that means running “adb logcat” with no extra parameters since you need to see messages from the Facebook activity. 

@wilsonwansun

Do you have addition permissions from Facebook?

Yes, I have 2 permissions: facebook.login( { “user_friends”, ‘publish_actions’ } ). But I don’t think addition permissions needed for inviting user.

 

How do you enable the “deep linking”?

You can find it on Facebook Developer Portal.

 

Do you need an approval of Facebook’s Game Center?

No, I don’t know what is Facebook’s Game Center.

 

Can this app request invitation dialogue work before the iOS app published? (the iPhone Store ID filled at iOS setting at Facebook is invalid)

Yes, it’s true.

Thanks @ouguolin :slight_smile:

According to Facebooks Docs, “user_friends” is required, but it’s a permission that can be used without Facebook’s approval.

I have some additional questions:  Are you wanting to do the Facebook Invite dialog:

https://developers.facebook.com/docs/app-invites/overview

or Game Requests:

https://developers.facebook.com/docs/games/services/gamerequests

Rob

Thanks @Rob

The Facebook Invite Dialog is not currently supported by the facebook.v4 plugin.

https://forums.coronalabs.com/topic/61288-facebook-v4-supported-features-and-maturity/?hl=%2Bfacebook+%2Binvite+%2Bdialog#entry317678

It is a valuable feature and I hope Corona will continue to work on this…

The Game Request works fine with the “request” dialogue of the facebook.v4 plugin, after proper setting of FB portal, and without additional approval from FB.

However, the setting of FB portal requires that the mobile version have to be published, which was the mistake I made before.