stanga, working on it. Implemented on Android, also updated to latest SDK and added sharing dialog support. Working on iOS implementation.
Lerg,
Any plans on odnoklassniki api implementation?
divol13, I could make it, but I don’t think it worth the effort. It’s not widely used on mobiles.
Thank you Lerg!
Please let me know when you’re done with iOS, I can’t wait to integrate this into our app.
stanga, almost done with the token. Only left is to add support for local image upload for the share dialog on iOS. Will sort it out by the end of the week.
Finally finished working on the accessToken and showShareDialog.
vk.getAccessToken() - new method.
vk.showShareDialog() - params have changed a little (no underscore syntax anymore). Added image upload ability. Added completion listener. Works on both iOS and Android.
Thank you for your work.
Thank you!
After update we noticed that app fall down with error “…init.lua module plugin.vk not found…”
https://drive.google.com/open?id=0B-BZX85l7gp_Z1dpZERBc0Jla3M
Some build process issue. I am figuring this out at the moment.
You can now use the plugin on android and get the access token. However showShareDialog() is still not working. That will be resolved later.
showShareDialog is now fixed as well.
Hello! Program crash after showShareDialog launch. Share window succes appear, after press “share” on it game crash without any error. Can you suggest whats the problem?
local function processOpenURL(url) if url:sub(1, 2) == 'vk' then vk.processOpenURL(url, 'com.vk.vkclient') end end local \_init = vk.init function vk.init(app\_id, permissions, launchArgs) \_init(app\_id, permissions) if launchArgs and launchArgs.url then processOpenURL(launchArgs.url) end end local function onSystemEvent(event) if event.type == 'applicationOpen' and event.url then processOpenURL(event.url) end end Runtime:addEventListener('system', onSystemEvent)
local launchArgs = ... vk.init("5625852",{'messages', 'friends', 'wall', 'photos'},launchArgs)
vk.login()
vk.showShareDialog({-- text = "Sample text", text = 'Sample text', image = { filename="image.png", baseDir=system.ResourceDirectory }, listener = function(event) print('Share dialog event:', json.prettify(event)) end })
resolved. didn’t add
local function onSystemEvent(event) if event.type == 'applicationOpen' and event.url then processOpenURL(event.url) end end
dementor000, thanks for sharing!
Hello.
We have a problem when we are trying to send the game to apple:
ERROR ITMS-90535: “Unexpected CFBundleExecutable Key. The bundle at ‘Payload/Election source.app/VKSdkResources.bundle’ does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.”
Hi. I’ve seen this before, surprised it come back. Will look into it a bit later this week.
Should be fixed now.
I can’t seem to be able to share and image on Android.
I perform a login, then I call:
local options = { text = "some message", linkTitle = "My App Name", link = "http://mywebsite.com", image = { filename = "assets/images/share.png", baseDir = system.ResourceDirectory }, listener = \_shareListener } vk.showShareDialog(options)
And in response I get:
event : { name : "shareDialog", errorMessage : "VKError (API errorVKError (code: 15; ; Access denied: no access to call this method))", errorCode : -101, isError : true }
Should the share dialog work on Android?
Which permissions should I ask for to be able to share? I didn’t see anything about it in the docs.
What else could be the problem?
Thanks
There is another strange issue we are experiencing around the login.
On iOS, when the VK app is not installed on the device, after running the following code:
local loginOptions = {} vk.login(\_vkLoginListener, loginOptions)
if the device is connected to wifi, there is no response after this login call. The listener is simply never called.
If the device is roaming (no wifi, celular connection instead), immediately after the login call the listener receives the string:
The operation couldn’t be completed. (ErrorEmptyListForMessageSendDomain error 1001.)
This was tested with iOS 9 and 8, and it’s persistent not matter what we pass to the login function:
local loginOptions = { inApp = false } vk.login(\_vkLoginListener, loginOptions)
or
local loginOptions = { inApp = true } vk.login(\_vkLoginListener, loginOptions)
On Android, the login works as expected even when the VK app is not installed.
Why is this happening? Can someone please help?
Thanks