facebook v4 shareDialog questions

I’m testing the facebook v4 shareDialog

My facebookListener looks like this:

 local function facebookListener( event ) if ( "session" == event.type ) then if ( "login" == event.phase ) then local shareOptions = { link = "http://devilsquid.com/skub/", title = "This game is going to make you crazy!", description = "This is a test post.", picture = "http://devilsquid.com/wp-content/uploads/2015/10/home\_teaser.jpg", ref = "ingame-menu" } facebook.showDialog( "link", shareOptions ) end elseif ( "dialog" == event.type ) then print("\n\n") print("Facebook Response ##########################################################") print( event.response ) print("\n\n") end end

The only thing, that is working for me here, is link option. The facebook share dialog grabs an image from the link and places the url beside.

But I do not see the title, the description, the picture and the ref option. I also checked the stats of the corresponding facebook app. I can see that the dialog gets opened, but none of the options are shown there (the ref string would be interesting in example).

Nevertheless the post can be send and is successfully posted on facebook timeline. But I really would like to pre-populate the dialog with some additional text (description option?).

Now the question: is the because of the beta status, or am I doing wrong?

Hi DevilSquid - Rene,

Your code looks correct. Which platforms, os versions and devices are you hitting this issue with?

Hi Ajay,

I’ve tested this on iPhone 5 with iOS 9.2.1.

Here is a part of the log that gets printed when I touch the button to open the sharing dialog:

Jan 23 14:48:09 iPhone skub[343] \<Warning\>: plugin com.apple.share.Facebook.post invalidated Jan 23 14:48:32 iPhone Facebook[216] \<Warning\>: -canOpenURL: failed for URL: "fb-ama://" - error: "(null)" Jan 23 14:48:34 iPhone SpringBoard[48] \<Error\>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName] Jan 23 14:48:34 iPhone Facebook[216] \<Warning\>: -canOpenURL: failed for URL: "fb1097218843641907://authorize#e2e=%7B%22init%22%3A1453556912720%7D&expires\_in=5183812&signed\_request=Ju3asvB3RD9RpqLiSrC5-oqIwTbx1TXkU3hLYUe1yQw.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUQ4S3hKQ0lkdzN5XzlPWW83Qk41SEJpZHJ2dkNIV1lqOTZDX0tyU1hLeGxBRlV6RzFjU25PcnhCaDZVdGc3dDNBRU5zSVlxZUVodDk1c1ZHS1V5OThPb2t6d0tRM0VXYU1oUUFRVVVPQlIyaUxyQlNjbTFJdGRCcXJwUmFqN2d5a1c1ZlR6RTlvU25ZLXhaelE2dmhHeTQ4MlI1ZkxCT0ZTTU5hYVRqNzJTRXNQX1RrazZTX0p4cVZzZEJFTHVmRHFyYVlPOUxzOVJxbV9PVmV6UWVwWUpMZjVkT2xkTHl4LXl5Ul9tbTVGMjJWN3BkaVZBRFd6SUVJblEyczVPZkVkcXRXZEc4alEzcWZPQTJkcDI4N0xNOHlXSmJoQlNuQXJzc1NIelkzWTJ3QlJSRmJzVm9FbGplQ2Y2U2ZhX0hSWEVPbGVFenRFeldjd0Vsb3pZUUw0X1h0YXVZLVNIYTl6WUpSMEc0RnBQZUhxb0tuUDdGbVlfaHFpMjYwNzVWQUF6UzVOUTMxLThGY3E0dmVtcTltRTciLCJpc3N1ZWRfYXQiOjE0NTM1NTY5MTMsInVzZXJfaWQiOiI2NTMwMTg1MDgxNzQ1OTkifQ&state=%7B%22challenge%22%3A%22FCieFDtnoCuwbOInFuhxLREThDA%3D%22%2C%22com.facebook.sdk\_client\_state%22%3Atrue%2C%223\_method%22%3A0%2C%220\_auth\_logger\_id%22%3A%2240B60043-B00D-428F-90FD-449BFBBF61F1%22%7D&granted\_scopes=user\_friends%2Cpublic\_profile&denied\_scopes=&access\_token=CAAPl6itqiDMBAMUFnkDNWE9aRBImZCs7pfVBtzdre7vyOk9UDXvF5ZAW9ZBTRnLNXcyv9VZBO7pwQoNX05amZC6AexxqU70QIzUuO4yTVZBVKZCsBAnZBYCVurwRxlZCSGszJ0hfWwJT5mtjlU2yIBbWIHxyzzx9EhZA1ZBkpZCM97mixZCHwryOSK5mpHQ23SZBGYIAQ4HQtJmwdvFl31oLX9tTQqivEaZAPDWjJ5JBc2LZA1ArubM7NgSOzOHzAk80m2B8lNcZD" - error: "This app is not allowed to query for scheme fb1097218843641907" Jan 23 14:48:34 iPhone securityd[87] \<Error\>: SecDbRecordChange db \<SecDbConnection rw open\> changed outside txn Jan 23 14:48:34 iPhone skub[343] \<Warning\>: FBSDKLog: starting with Graph API v2.4, GET requests for /me should contain an explicit "fields" parameter Jan 23 14:48:34 iPhone pkd[122] \<Warning\>: assigning plug-in com.apple.share.Facebook.post(47.0) to plugin sandbox Jan 23 14:48:34 iPhone pkd[122] \<Warning\>: enabling pid=343 for plug-in com.apple.share.Facebook.post(47.0) DA3F2934-4213-4E20-AA35-6E7C56EE7D0F /private/var/mobile/Containers/Bundle/Application/AAC4D47F-AB91-466F-B069-BDCFA2014EC2/Facebook.app/PlugIns/ShareExtension.appex Jan 23 14:48:34 iPhone ShareExtension[353] \<Warning\>: host connection \<NSXPCConnection: 0x176895c0\> connection from pid 343 invalidated Jan 23 14:48:34 iPhone kernel[0] \<Notice\>: Sandbox: ShareExtension(353) deny(1) file-read-data /bin

Many warnings etc.

Maybe you can see what is going wrong here?

Best

René

Hi DevilSquid - Rene,

Your code looks correct. Which platforms, os versions and devices are you hitting this issue with?

Hi Ajay,

I’ve tested this on iPhone 5 with iOS 9.2.1.

Here is a part of the log that gets printed when I touch the button to open the sharing dialog:

Jan 23 14:48:09 iPhone skub[343] \<Warning\>: plugin com.apple.share.Facebook.post invalidated Jan 23 14:48:32 iPhone Facebook[216] \<Warning\>: -canOpenURL: failed for URL: "fb-ama://" - error: "(null)" Jan 23 14:48:34 iPhone SpringBoard[48] \<Error\>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName] Jan 23 14:48:34 iPhone Facebook[216] \<Warning\>: -canOpenURL: failed for URL: "fb1097218843641907://authorize#e2e=%7B%22init%22%3A1453556912720%7D&expires\_in=5183812&signed\_request=Ju3asvB3RD9RpqLiSrC5-oqIwTbx1TXkU3hLYUe1yQw.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUQ4S3hKQ0lkdzN5XzlPWW83Qk41SEJpZHJ2dkNIV1lqOTZDX0tyU1hLeGxBRlV6RzFjU25PcnhCaDZVdGc3dDNBRU5zSVlxZUVodDk1c1ZHS1V5OThPb2t6d0tRM0VXYU1oUUFRVVVPQlIyaUxyQlNjbTFJdGRCcXJwUmFqN2d5a1c1ZlR6RTlvU25ZLXhaelE2dmhHeTQ4MlI1ZkxCT0ZTTU5hYVRqNzJTRXNQX1RrazZTX0p4cVZzZEJFTHVmRHFyYVlPOUxzOVJxbV9PVmV6UWVwWUpMZjVkT2xkTHl4LXl5Ul9tbTVGMjJWN3BkaVZBRFd6SUVJblEyczVPZkVkcXRXZEc4alEzcWZPQTJkcDI4N0xNOHlXSmJoQlNuQXJzc1NIelkzWTJ3QlJSRmJzVm9FbGplQ2Y2U2ZhX0hSWEVPbGVFenRFeldjd0Vsb3pZUUw0X1h0YXVZLVNIYTl6WUpSMEc0RnBQZUhxb0tuUDdGbVlfaHFpMjYwNzVWQUF6UzVOUTMxLThGY3E0dmVtcTltRTciLCJpc3N1ZWRfYXQiOjE0NTM1NTY5MTMsInVzZXJfaWQiOiI2NTMwMTg1MDgxNzQ1OTkifQ&state=%7B%22challenge%22%3A%22FCieFDtnoCuwbOInFuhxLREThDA%3D%22%2C%22com.facebook.sdk\_client\_state%22%3Atrue%2C%223\_method%22%3A0%2C%220\_auth\_logger\_id%22%3A%2240B60043-B00D-428F-90FD-449BFBBF61F1%22%7D&granted\_scopes=user\_friends%2Cpublic\_profile&denied\_scopes=&access\_token=CAAPl6itqiDMBAMUFnkDNWE9aRBImZCs7pfVBtzdre7vyOk9UDXvF5ZAW9ZBTRnLNXcyv9VZBO7pwQoNX05amZC6AexxqU70QIzUuO4yTVZBVKZCsBAnZBYCVurwRxlZCSGszJ0hfWwJT5mtjlU2yIBbWIHxyzzx9EhZA1ZBkpZCM97mixZCHwryOSK5mpHQ23SZBGYIAQ4HQtJmwdvFl31oLX9tTQqivEaZAPDWjJ5JBc2LZA1ArubM7NgSOzOHzAk80m2B8lNcZD" - error: "This app is not allowed to query for scheme fb1097218843641907" Jan 23 14:48:34 iPhone securityd[87] \<Error\>: SecDbRecordChange db \<SecDbConnection rw open\> changed outside txn Jan 23 14:48:34 iPhone skub[343] \<Warning\>: FBSDKLog: starting with Graph API v2.4, GET requests for /me should contain an explicit "fields" parameter Jan 23 14:48:34 iPhone pkd[122] \<Warning\>: assigning plug-in com.apple.share.Facebook.post(47.0) to plugin sandbox Jan 23 14:48:34 iPhone pkd[122] \<Warning\>: enabling pid=343 for plug-in com.apple.share.Facebook.post(47.0) DA3F2934-4213-4E20-AA35-6E7C56EE7D0F /private/var/mobile/Containers/Bundle/Application/AAC4D47F-AB91-466F-B069-BDCFA2014EC2/Facebook.app/PlugIns/ShareExtension.appex Jan 23 14:48:34 iPhone ShareExtension[353] \<Warning\>: host connection \<NSXPCConnection: 0x176895c0\> connection from pid 343 invalidated Jan 23 14:48:34 iPhone kernel[0] \<Notice\>: Sandbox: ShareExtension(353) deny(1) file-read-data /bin

Many warnings etc.

Maybe you can see what is going wrong here?

Best

René