showDialog("friends") not Returning Valid Facebook User Ids

The stripped-down code below seems to work properly. I get logged into Facebook, receive a valid access token, get presented with a list of friends, can choose one or many of them and I am then returned a list of those chosen in a table called event.data. As expected, inside that table are two entries; id and fullName. The fullName is correct and shows the actual names of the FB users I chose. However, the ids look more like app ids and nothing like Facebook user ids. The output of event.data looks as follows:

table: 0x77a69610 { [1] =\> table: 0x77a69610 { [id] =\> "AaKEVLpMmwsGXBjuNMNH8urOw5teuInnoUPtRVrBoBPaBI3Y5Lo2ZSiMVJ2JiaYRw1CbXpSvIA0LtxoOrhMQj9yyz63gM3yhemlNqV9ur628GQ" [fullName] =\> "Alan Smith" } [2] =\> table: 0x77a69610 { [id] =\> "AaIHoRxu5lmht13bL8ba56Z88mZ-CEKv7a9atLs7pJl1aXbfmh6KvVSOn\_X6xaEfh0W\_biVIstJpRVHTgmMA1KNtJH6ZM6t3KknFG\_1F\_FJ2eA" [fullName] =\> "Alyssa Johnson" } [3] =\> table: 0x77a69610 { [id] =\> "AaKNPjRTGcs2Ah7hi9zHOJ\_xdW\_8QdKbjauysIJQZXt-yLlilX0JrVR0TDayw8Z5iM5XAD89FtTusuruCxtG5nO2a7rITU7W0vx0E97vPDbFKQ" [fullName] =\> "Angela Jones" } }

The Facebook ids should look something like this: 10153442260092654

Any assistance is greatly appreciated!

Thanks,

Scott

local facebook = require( "plugin.facebook.v4" ) local util = require("Utility") function facebookListener( event ) print("facebookListener") print("event.type", event.type) print("event.phase", event.phase) if ( "session" == event.type ) then if ( "login" == event.phase ) then accessToken = event.token if accessToken == nil then local alert = native.showAlert( "Notification", "Facebook error. Please check your Facebook credentials.", { "OK" } ) else facebook.showDialog( "friends", facebookListener ) end end elseif ( "request" == event.type ) then print( "request" ) response = json.decode( event.response ) elseif ( "dialog" == event.type ) then print( "dialog" ) response = json.decode( event.response ) elseif ( "friends" == event.name ) then print("friends") util:print\_r(event.data) else print("none of the above", event.type) response = json.decode( event.response ) end end print("start facebook login") facebook.login( facebookListener, {"public\_profile","email","user\_friends"} )

Can I get you to make a small demo app using that code and file a bug report? It will need to be a main.lua, config.lua and the build.settings you’re using along with any other assets. Put that in a .zip file and use the Report a Bug link at the top of the page.

When you get the email confirmation of the bug, please post the caseID number back here.

Thanks

Rob

Rob,

The case number is 46553. Thanks for the assistance! Go Canes! :slight_smile:

Scott

I hope they have a good season!

Hi Rob,

When you get a chance, can you check the status of this ticket?

Thanks ahead of time,

Scott

Hey Rob,

I am having the same exact issue. It is giving me some really long ID that has nothing to do with the Users ID.

Please help!

Hi everyone,

We’re hoping to deprecate facebook.showDialog( “friends”) in a future release of the Facebook-v4 plugin as users can tag friends onto posts using facebook.showDialog( “link” ).

Do you guys have a use-case where you absolutely need to use facebook.showDialog( “friends” ) and the alternative isn’t sufficient?

We were not wanting to tag friends in posts. Instead, we were wanting to present the user with a list of their friends who do not have the app installed so they may send a game invite to them.

After some digging we think the Facebook IDs returned with the facebook.showDialog( “friends”) above are most likely “app-scoped” IDs. We decided to take another route and ended up using facebook.showDialog( “requests”) which seems to work for us.

Thanks!

Can I get you to make a small demo app using that code and file a bug report? It will need to be a main.lua, config.lua and the build.settings you’re using along with any other assets. Put that in a .zip file and use the Report a Bug link at the top of the page.

When you get the email confirmation of the bug, please post the caseID number back here.

Thanks

Rob

Rob,

The case number is 46553. Thanks for the assistance! Go Canes! :slight_smile:

Scott

I hope they have a good season!

Hey everyone,

 

The Facebook-v4 (now known as simply “Facebook”) plugin is now out of beta:

https://coronalabs.com/blog/2016/10/28/facebook-plugin-update-we-are-out-of-beta/

 

And with that we’ve deprecated facebook.showDialog(“friends”) in favor of selecting friends in broader contexts, such as in the Share and Game Request Dialogs.

 

Consult the new Facebook Versioning/Upgrade guide for more info:

https://docs.coronalabs.com/plugin/facebook-v4/fbUpgrade.html#update-stable-release

Hi Rob,

When you get a chance, can you check the status of this ticket?

Thanks ahead of time,

Scott

Hey Rob,

I am having the same exact issue. It is giving me some really long ID that has nothing to do with the Users ID.

Please help!

Hi everyone,

We’re hoping to deprecate facebook.showDialog( “friends”) in a future release of the Facebook-v4 plugin as users can tag friends onto posts using facebook.showDialog( “link” ).

Do you guys have a use-case where you absolutely need to use facebook.showDialog( “friends” ) and the alternative isn’t sufficient?

We were not wanting to tag friends in posts. Instead, we were wanting to present the user with a list of their friends who do not have the app installed so they may send a game invite to them.

After some digging we think the Facebook IDs returned with the facebook.showDialog( “friends”) above are most likely “app-scoped” IDs. We decided to take another route and ended up using facebook.showDialog( “requests”) which seems to work for us.

Thanks!

Hey everyone,

 

The Facebook-v4 (now known as simply “Facebook”) plugin is now out of beta:

https://coronalabs.com/blog/2016/10/28/facebook-plugin-update-we-are-out-of-beta/

 

And with that we’ve deprecated facebook.showDialog(“friends”) in favor of selecting friends in broader contexts, such as in the Share and Game Request Dialogs.

 

Consult the new Facebook Versioning/Upgrade guide for more info:

https://docs.coronalabs.com/plugin/facebook-v4/fbUpgrade.html#update-stable-release