native.showPopup("social", ...) is returning event.action as cancelled when posting to facebook through an Android device.

Hi!

I’m having trouble with an app while using the social plug-in on facebook with an android device. After posting on facebook, the event.action is returning “cancelled”, even though the post is being sent, so my code is not runnning.

My code looks something like this:
 

local function socialPayment(event)

print(“socialPayment Function”)

print(event.action) – is returning “cancelled” after the user posts in facebook"

if event.action == “sent” then

  – CODE NOT RUNNING

end


local options = {

  service = “share”,

  listener = socialPayment,

  url = “some url”

}

if event.target.img ~= nil then

  options.image = {filename=event.target.img, baseDir=system.TemporaryDirectory }

end

native.showPopup( “social”, options )

I would appreciate some help as it is a key feature for my app.

Thanks!

Any help, please?

I have the same issue. It works fine when posting on Twitter (I got the “sent” action value), but I always got “cancelled” when posting on facebook.

Similar problem with iOS 9.1 SDK 2731 Xcode 7.0 iPad Mini 4.

Facebook posting using the social plugin returns “sent” in the callback even when FB post is cancelled.

Hi all,

Considering that Twitter is working correctly, but Facebook isn’t, this is likely a change to the Facebook app. Moreover, we set “event.action” based on the result code provided to “Activity.onActivityResult()” after the user has redirected back to the Corona app. If we get “RESULT_CANCELED”, we set “event.action” to “cancelled” logically. According to the documentation for Activity.onActivityResult(), we’ll get the result code “RESULT_CANCELED” if “activity explicitly returned that, didn’t return any result, or crashed during its operation”. Considering that the activity doesn’t crash, we think the first case is true.

Overall, I’d guess that the Facebook app is failing to provide a result, thus we get “RESULT_CANCELED” as the default. However, we don’t have the source code for the FB app to prove it.

Brent

Any help, please?

I have the same issue. It works fine when posting on Twitter (I got the “sent” action value), but I always got “cancelled” when posting on facebook.

Similar problem with iOS 9.1 SDK 2731 Xcode 7.0 iPad Mini 4.

Facebook posting using the social plugin returns “sent” in the callback even when FB post is cancelled.

Hi all,

Considering that Twitter is working correctly, but Facebook isn’t, this is likely a change to the Facebook app. Moreover, we set “event.action” based on the result code provided to “Activity.onActivityResult()” after the user has redirected back to the Corona app. If we get “RESULT_CANCELED”, we set “event.action” to “cancelled” logically. According to the documentation for Activity.onActivityResult(), we’ll get the result code “RESULT_CANCELED” if “activity explicitly returned that, didn’t return any result, or crashed during its operation”. Considering that the activity doesn’t crash, we think the first case is true.

Overall, I’d guess that the Facebook app is failing to provide a result, thus we get “RESULT_CANCELED” as the default. However, we don’t have the source code for the FB app to prove it.

Brent