PostID always null after a Share Link Dialog

I am using the Corona Facebook Sample. It is working and I am seeing the posts on my feed.

But after I perform a Share Link Dialog, I am getting a null for the Post_ID.  For all other shares (Post Photo, Post Msg,…) I get a ID, only for the Share Link Dialog that I gets null.

Using Share Link Dialog (id is always null):

Nov 11 01:09:48 FB-Corona[549] \<Warning\>: Facebook Listener events: Nov 11 01:09:48 FB-Corona[549] \<Warning\>: type(dialog) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: name(fbconnect) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: didComplete(true) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: isError(false) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: response(fbconnect://success? ... #33) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: event.name fbconnect Nov 11 01:09:48 FB-Corona[549] \<Warning\>: event.type: dialog Nov 11 01:09:48 FB-Corona[549] \<Warning\>: isError: false Nov 11 01:09:48 FB-Corona[549] \<Warning\>: didComplete: true Nov 11 01:09:48 FB-Corona[549] \<Warning\>: response: fbconnect://success?PostID=(null) Nov 11 01:09:48 FB-Corona[549] \<Warning\>: dialog response: fbconnect://success?PostID=(null)

Using Show Feed Dialog (id not null):

Nov 11 01:12:13 FB-Corona[549] \<Warning\>: Facebook Listener events: Nov 11 01:12:13 FB-Corona[549] \<Warning\>: type(dialog) Nov 11 01:12:13 FB-Corona[549] \<Warning\>: name(fbconnect) Nov 11 01:12:13 FB-Corona[549] \<Warning\>: didComplete(true) Nov 11 01:12:13 FB-Corona[549] \<Warning\>: isError(false) Nov 11 01:12:13 FB-Corona[549] \<Warning\>: response(fbconnect://success? ... #58) Nov 11 01:12:13 FB-Corona[549] \<Warning\>: event.name fbconnect Nov 11 01:12:13 FB-Corona[549] \<Warning\>: event.type: dialog Nov 11 01:12:13 FB-Corona[549] \<Warning\>: isError: false Nov 11 01:12:13 FB-Corona[549] \<Warning\>: didComplete: true Nov 11 01:12:13 FB-Corona[549] \<Warning\>: response: fbconnect://success?PostID=927753133944519\_928311317222034 Nov 11 01:12:13 FB-Corona[549] \<Warning\>: dialog response: fbconnect://success?PostID=927753133944519\_928311317222034

Any ideas why I am getting a PostID=null?

Anyone?

To make things worse, I just noticed that if the user cancels the dialog, I get the same response to the listener (with PostID=null). So, it is impossible now to know if the user shared or not.

Hi Renato - Red Beach,

Try changing the link being shared to something generic, like google.com. We recently discovered that the blog post link we use in the sample got flagged on Facebook for some reason.

Hi Renato - Red Beach,

So we figured out the issue. Facebook flagged the 3rd-party facebook icon linked to our blog post as abusive content, not the actual blog post. If you modify the sample as shown below, you should see the link post to Facebook.

-- This displays a Facebook Dialog for posting a link with a photo to your Facebook Wall if fbCommand == SHARE\_LINK\_DIALOG then local response = facebook.showDialog( "link", { name = "Facebook v4 Corona plugin on iOS!", link = "https://coronalabs.com/blog/2015/09/01/facebook-v4-plugin-ios-beta-improvements-and-new-features/", description = "More Facebook awesomeness for Corona!", -- Facebook has flagged the facebookbrand.com domain as abusive content, so don't include this image. --picture = "https://www.facebookbrand.com/img/fb-art.jpg", }) printTable(response) end

Feel free to include any other image URL for your own testing. You can check if a domain has been flagged by Facebook here.

We will change the sample for daily builds after 2768.

Hi Ajay.

Thanks for your reply.  I tested your code above and still does not work.  I had also tried using my own table info and same problem (PostID=(null)).

Did it work there?

It’s working here, yes.

It may be related to an expired Facebook Access Token. Try logging out of Facebook through the sample and logging back in to Facebook through the sample. Then try the Share Link dialog again.

I did a logout and still no joy. Also tried removing the app access from my fb account and nothing.

Also tested using link=http://www.google.com and no success.

And what is strange is that only the Share Link dialog that shows that problem.  Sharing using Show Feed Dialog works fine.

I am using daily build 2015.2744. I am going to download the latest one and try again.

Tested here using the latest build (2015.2768) and same issue.

Also, I find it strange for the picture url be the problem. When you use the Share Link Dialog, the only information used by Facebook is the shared link. All other information (title, description,picture) is ignored since Facebook gets the title, image, description from the og meta tags of the shared link.

So, you guys there are really receiving the Post ID? Because my problem is the PostID == null. The post itself is shared and appears on my feed.

Correction: It’s working on Android (barring Android 6.0), but on iOS, I do see the same issue.

The issue is coming from the iOS plugin, not the sample code.

So, did several tests and after uninstalling the Facebook app I was able to get the postID  (so the facebook used the Safari to share).

I then installed the Facebook app back and got postID=(null) again.  Maybe is it a Facebook app bug?

PS: Yes, I am testing on iOS

I can confirm that behavior as well, even after a completely fresh run. It seems that if the Facebook App is installed, Facebook won’t provide a PostID back to the native iOS side. So, I agree, the issue is with the Facebook app.

With the Facebook App installed, does the Corona Facebook sample report that you have successfully logged in before you try the Share Link Dialog button? This is expected behavior if you’re either not logged in, or have an expired access token.

Yes, I get a successful login. And other Share methods works fine, returning the postID

I am having a similar issue with Android 6 (Nexus 5). The post does get posted.

Here’s the code & response :

facebook.setFBConnectListener( onFbComplete ) local fbOptions = { placeId = locationId, } facebook.showDialog( 'link', fbOptions )

{"type":"dialog","name":"fbconnect","didComplete":true,"isError":false,"response":"fbconnect://success?PostID="}

Anyone?

To make things worse, I just noticed that if the user cancels the dialog, I get the same response to the listener (with PostID=null). So, it is impossible now to know if the user shared or not.

Hi Renato - Red Beach,

Try changing the link being shared to something generic, like google.com. We recently discovered that the blog post link we use in the sample got flagged on Facebook for some reason.

Hi Renato - Red Beach,

So we figured out the issue. Facebook flagged the 3rd-party facebook icon linked to our blog post as abusive content, not the actual blog post. If you modify the sample as shown below, you should see the link post to Facebook.

-- This displays a Facebook Dialog for posting a link with a photo to your Facebook Wall if fbCommand == SHARE\_LINK\_DIALOG then local response = facebook.showDialog( "link", { name = "Facebook v4 Corona plugin on iOS!", link = "https://coronalabs.com/blog/2015/09/01/facebook-v4-plugin-ios-beta-improvements-and-new-features/", description = "More Facebook awesomeness for Corona!", -- Facebook has flagged the facebookbrand.com domain as abusive content, so don't include this image. --picture = "https://www.facebookbrand.com/img/fb-art.jpg", }) printTable(response) end

Feel free to include any other image URL for your own testing. You can check if a domain has been flagged by Facebook here.

We will change the sample for daily builds after 2768.

Hi Ajay.

Thanks for your reply.  I tested your code above and still does not work.  I had also tried using my own table info and same problem (PostID=(null)).

Did it work there?

It’s working here, yes.

It may be related to an expired Facebook Access Token. Try logging out of Facebook through the sample and logging back in to Facebook through the sample. Then try the Share Link dialog again.

I did a logout and still no joy. Also tried removing the app access from my fb account and nothing.

Also tested using link=http://www.google.com and no success.

And what is strange is that only the Share Link dialog that shows that problem.  Sharing using Show Feed Dialog works fine.

I am using daily build 2015.2744. I am going to download the latest one and try again.

Tested here using the latest build (2015.2768) and same issue.

Also, I find it strange for the picture url be the problem. When you use the Share Link Dialog, the only information used by Facebook is the shared link. All other information (title, description,picture) is ignored since Facebook gets the title, image, description from the og meta tags of the shared link.

So, you guys there are really receiving the Post ID? Because my problem is the PostID == null. The post itself is shared and appears on my feed.