Hi,
I have an Android 9.0 smartphone. I am trying to test out Corona’s Social plugin, but I can’t seem to get any image to be shared with the message. For example, if I share to gmail I will just get “Hello World!”, and if I share to Twitter, it is the same. Below is my code, as you can see it is practically the same as the example without the URL parameter. I tried it with the URL parameter without any luck. I am trying to just share the stock Icon file that comes with Corona.
local function show\_alert() local serviceName = "twitter" -- Supported values are "twitter", "facebook", or "sinaWeibo" local isAvailable = native.canShowPopup( "social", serviceName ) if ( isAvailable ) then local listener = {} function listener:popup( event ) print( "name: " .. event.name ) print( "type: " .. event.type ) print( "action: " .. tostring( event.action ) ) print( "limitReached: " .. tostring( event.limitReached ) ) end native.showPopup( "social", { service = serviceName, message = "Hello world!", listener = listener, image = { filename="Icon.png", baseDir=system.ResourceDirectory } }) else native.showAlert( "Cannot send " .. serviceName .. " message.", "Please setup your " .. serviceName .. " account or check your network connection.", { "OK" } ) end end
The plugin is definitely installed in my build.settings. Do you think I need to save the screenshot to the camera roll first to allow sharing? Other games (not built in Corona) seem to be able to share an image without saving it to the camera roll so I do not think it is that.
Thanks for any help.
EDIT: No errors show up in adb logcat, so we can rule that out.