Getting a list of facebook friends who have not installed the app.

Hi all,

I am having issues with getting a list of users who have not installed my app yet.  I had it working perfectly two months ago, but left it to work on another project, not it only seems to return those users who already installed the app…

This seems consistent with this facebook documentation and v2.1 of open graph, I have also tried to use the “facebook.showDialog( “friends”, onComplete )” command and it has the same result…

Corona Version : 2401

Running on : iOS

Cheers,

Craig

Welcome to Facebook development.  You can only get friends who’ve installed your app now.

Rob

as rob said, you only get friends that have it installed when you use facebook.request(“me/friends”, “GET”) as per the new facebook rules

but… if you just want the list of friends so you can ‘invite them to play’ you can use facebook.showDialog(“apprequests”, {title=“Choose Friends”, message=""} ) 

This will give you a pop up from facebook where you can select your friends that dont have it installed.

although I’ve not gotten it to work yet, facebook does have an “me/invitable_friends” edge that is supposed to give you a list of friends NOT currently using your app.  This is a special api that requires you to ask facebook in advance for permission to use it…

Some documentation implies it should work with an app in develop-mode but again, mine is currently falling flat…

If anyone else has gotten it to work, I’d love some tips…

ok, I believe I’ve figured out the current state of Facebooks ever changing rules

me/friends only returns users with the app installed

If you either user a developer account, or get advanced permission from facebook, you can now get the full friend list with this call.

facebook.request( “me/invitable_friends?offset=1&limit=600”, “GET”, {} )

Other rules:

your app has to be a game

it has to have a fbCanvas pressence (features running inside of Facebook)

both http and https canvas URL’s must be filled out in the Facebook portal

I’m using a “test” version (in Facebook terms) of my app…not sure if that is helping me or not but I finally have this working…

Once the code is cleaned up, I’ll go back and deal with the facebook review and approval process…

does anyone know if you can switch the “listener” param to subsequent facebook.login calls

for example:

function listen1(event)  …someStuff; end;

function listenTWO (event)  …someOtherStuff; end;

can you now do:

– initial facebook login

facebook.login(appID, listen1, {“public_profile”, “user_friends”})

– and then, for the NEXT login call, pass a DIFFERENT listener?

facebook.login(appID, listenTWO, {“some_extended_permission”})

the code in the Facebook example uses an odd-style that makes me worry that this has not been tested or is officially not supported

all feedback welcome!

Welcome to Facebook development.  You can only get friends who’ve installed your app now.

Rob

as rob said, you only get friends that have it installed when you use facebook.request(“me/friends”, “GET”) as per the new facebook rules

but… if you just want the list of friends so you can ‘invite them to play’ you can use facebook.showDialog(“apprequests”, {title=“Choose Friends”, message=""} ) 

This will give you a pop up from facebook where you can select your friends that dont have it installed.

although I’ve not gotten it to work yet, facebook does have an “me/invitable_friends” edge that is supposed to give you a list of friends NOT currently using your app.  This is a special api that requires you to ask facebook in advance for permission to use it…

Some documentation implies it should work with an app in develop-mode but again, mine is currently falling flat…

If anyone else has gotten it to work, I’d love some tips…

ok, I believe I’ve figured out the current state of Facebooks ever changing rules

me/friends only returns users with the app installed

If you either user a developer account, or get advanced permission from facebook, you can now get the full friend list with this call.

facebook.request( “me/invitable_friends?offset=1&limit=600”, “GET”, {} )

Other rules:

your app has to be a game

it has to have a fbCanvas pressence (features running inside of Facebook)

both http and https canvas URL’s must be filled out in the Facebook portal

I’m using a “test” version (in Facebook terms) of my app…not sure if that is helping me or not but I finally have this working…

Once the code is cleaned up, I’ll go back and deal with the facebook review and approval process…

does anyone know if you can switch the “listener” param to subsequent facebook.login calls

for example:

function listen1(event)  …someStuff; end;

function listenTWO (event)  …someOtherStuff; end;

can you now do:

– initial facebook login

facebook.login(appID, listen1, {“public_profile”, “user_friends”})

– and then, for the NEXT login call, pass a DIFFERENT listener?

facebook.login(appID, listenTWO, {“some_extended_permission”})

the code in the Facebook example uses an odd-style that makes me worry that this has not been tested or is officially not supported

all feedback welcome!