Hi
I’m using Windows daily build 2015.2646
I’ve been through all the docs, tutorials and blogs, webcasts and so forth.
I’m trying to use the simple social plugin for a user of my app to post a message on their timeline and my game will reward them with something for doing so, it’s all I need.
I’ve already got the code in place that checks they have facebook enabled on their device, then checks they have an internet connection.
But one thing is not explained in the social plugin docs, which is absolutely vital, did the user actually post a message to their timeline?
local options = { service = "facebook", message = "Check out this photo!", listener = eventListener, image = { { filename = "pic.jpg", baseDir = system.ResourceDirectory }, { filename = "pic2.jpg", baseDir = system.ResourceDirectory } }, url = "http://coronalabs.com" }
I can see that it’s the listener part of the options table but there are no examples that I can find to tell what values I should be “listening” for.
Scrumptious was mentioned as an example but that is not in the Corona folder on my computer. I watched the Scrumptious App Screencast and it was obvious that it didn’t apply to the simple social plugin.
In frustration, I took a look at https://github.com/coronalabs/plugins-sample-native-popup-social/
No help there either.
I looked through this forum and Rob told someone to put in a request for the feature, I can’t wait that long, this is the last thing I have to do to my app to make it ready for market release.
There must be thousands of Corona users that have used this plugin so can somebody please give me a code snippet of how to use the listener to get the desired response so I know the user did or did not post the message? I don’t want to experiment by continuously building the app and installing on the device until I get it right, it’s very frustrating.
Many thanks in advance.
Martin.
Update: While I’m waiting for a response I’ve been testing the other elements and they are not working on my Android device.
local isFacebookAvailable = native.canShowPopup( "social", "facebook" ) if isFacebookAvailable == true then showFB() end
showFB() is not getting called, I have a facebook account set up on my device for sure, in fact I got a message on it while I was testing the game.
My build.settings
settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight" }, }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_EXTERNAL\_STORAGE" }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon-xxhdpi.png", "Icon-xhdpi.png", "Icon-hdpi.png", "Icon-mdpi.png", "Icon-ldpi.png" }, versionCode = "10", usesFeatures = { { name = "android.hardware.camera", required = false }, { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, }, }, iphone = { plist = { UIAppFonts = { "Coaster.ttf", "Helsinki.ttf" }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png" }, }, }, }
Notice I’ve included the social plugin above.
Am I missing something? Do I need to require anything in my lua modules? Because I haven’t seen anything mentioned about that, do I need pro or enterprise subscription?
Any help would be greatly appreciated.