Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

VK Social Network
Started by Michael W. Sep 15 2015 02:35 PM

52 replies to this topic
release android ios
[TOPIC CONTROLS]
Page 1 of 3 1 2 3
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Michael W.

[GLOBAL: userInfoPane.html]
Michael W.
  • Contributor

  • 276 posts
  • Alumni

VK

by Spiral Code Studio


View and activate on the Corona Store


VK.com plugin. The largest Russian social network. With this plugin you can perform actions like authentication, retrieving a profile, inviting friends, posting messages, etc.

Documentation
  • tosters likes this

[TOPIC: post.html]
#2

sha-games

[GLOBAL: userInfoPane.html]
sha-games
  • Observer

  • 1 posts
  • Corona SDK

is it any russian documentation for this plugin?



[TOPIC: post.html]
#3

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

is it any russian documentation for this plugin?

Sorry, no. But it shouldn't be too hard to translate for anyone.



[TOPIC: post.html]
#4

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

Hi Lerg,

 

I'm trying to include the plugin but I'm not sure if there's a way to open the VKontakte app for better integration. Is that possible or are we restricted to web login?

 

edit: I'm trying it out on iOS at the moment but the question stands for both.



[TOPIC: post.html]
#5

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

By the way, I'm getting these 2 errors while trying to submit a distribution build to the store. Anything I can do to fix this @Lerg?

ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/Motus.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."
ERROR ITMS-90542: "Invalid CFBundleSupportedPlatforms value. The key 'CFBundleSupportedPlatforms' in the Info.plist file in bundle 'Payload/Motus.app/VKSdkResources.bundle' contains an invalid value '( "iPhoneSimulator" )'. Consider removing the CFBundleSupportedPlatforms key from the Info.plist. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."

Edited by bgmadclown, 07 December 2015 - 08:21 AM.

  • dima.shuvalov likes this

[TOPIC: post.html]
#6

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

Anything that you can help with, @Lerg?



[TOPIC: post.html]
#7

rustam

[GLOBAL: userInfoPane.html]
rustam
  • Observer

  • 16 posts
  • Corona SDK

hi,

i get the same two errors trying to upload a build. is there any solution?



[TOPIC: post.html]
#8

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

Hi. I am back and now I am able to look into this issue. Sorry for the delay.

Official VK app should work for authentication by default. Web login is only used when no official VK app found.



[TOPIC: post.html]
#9

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

It wasn't easy, but I've fixed the issue. Updated to latest VK iOS SDK.

I didn't try to upload to App Store, but there was a bug report for the original SDK and they said it was fixed.

Please try again.



[TOPIC: post.html]
#10

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

I couldn't get the VK app to launch but I'll sure try it again. Is there something that I might be missing that prevents the VK app from launching?

 

Thank you for the fix. Hopefully, I will try it in the following week and write it down here if I have any problem.



[TOPIC: post.html]
#11

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

I couldn't get the VK app to launch but I'll sure try it again. Is there something that I might be missing that prevents the VK app from launching?

 

Thank you for the fix. Hopefully, I will try it in the following week and write it down here if I have any problem.

I will check with the engineering team, but it might be that at this point it is not possible to launch official VK app on iOS 9. It should work on iOS 8.
Apple changed the behavior how apps open other apps by URLs, now you have to whitelist URLs you want to open. The docs on my website has been updated to include LSApplicationQueriesSchemes into build.settings. But it seems like it doesn't work.



[TOPIC: post.html]
#12

divol13

[GLOBAL: userInfoPane.html]
divol13
  • Observer

  • 7 posts
  • Corona SDK

How should I get a custom fields from users.get ?

 

I've already tried 

vk.request('users.get', { first_name, last_name, photo_100 }, 'GET', getListener)
vk.request('users.get', { "fields=first_name,last_name,photo_100" }, 'GET', getListener)

with no result, just id,first_name and last_name there is no photo_100 in response table

 
edit: finally I managed to get photo_100 with network.request, but I personally think it should be implemented in plugin.
 
Sadly plug in don't allow us to login via the VK application, like facebook v4 plugin do.
So I looking forward to get more suitable plugin for VK implementations.


[TOPIC: post.html]
#13

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

 

How should I get a custom fields from users.get ?

 

I've already tried 

vk.request('users.get', { first_name, last_name, photo_100 }, 'GET', getListener)
vk.request('users.get', { "fields=first_name,last_name,photo_100" }, 'GET', getListener)

with no result, just id,first_name and last_name there is no photo_100 in response table

 
edit: finally I managed to get photo_100 with network.request, but I personally think it should be implemented in plugin.
 
Sadly plug in don't allow us to login via the VK application, like facebook v4 plugin do.
So I looking forward to get more suitable plugin for VK implementations.

 

Sorry for a late reply.
In vk.request(), params are actually a key-value table.
So to get fields you write something like this:

vk.request('users.get', {fields = 'first_name,last_name,photo_100'}, 'GET', getListener)

Also the plugin should work with the official VK app for authentication, on which platform and version it doesn't work?



[TOPIC: post.html]
#14

paisaev

[GLOBAL: userInfoPane.html]
paisaev
  • Observer

  • 26 posts
  • Corona SDK

Hi.

I am using plugins-sample-vk (https://github.com/Lerg/plugins-sample-vk), I rewrite appId and build it to Android. I launch it on device and try to login to VK,  as a result i have this message: "{"error":"invalid_request","error_description":"sdk_package is incorrect"}".

This error appears only on the Android.

Where is my mistake?



[TOPIC: post.html]
#15

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

Hi.

I am using plugins-sample-vk (https://github.com/Lerg/plugins-sample-vk), I rewrite appId and build it to Android. I launch it on device and try to login to VK,  as a result i have this message: "{"error":"invalid_request","error_description":"sdk_package is incorrect"}".

Where is my mistake?

Probably there is a misconfiguration of your VK app on vk.com/dev
You can check this thread about the same error: https://github.com/VKCOM/vk-android-sdk/issues/10



[TOPIC: post.html]
#16

paisaev

[GLOBAL: userInfoPane.html]
paisaev
  • Observer

  • 26 posts
  • Corona SDK

Probably there is a misconfiguration of your VK app on vk.com/dev
You can check this thread about the same error: https://github.com/VKCOM/vk-android-sdk/issues/10

Now it is ok, thx!

How i can attach picture.png in vk.request({ 'wall.post' )  ?

picture.png is file in Resources directory?



[TOPIC: post.html]
#17

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

Now it is ok, thx!

How i can attach picture.png in vk.request({ 'wall.post' )  ?

picture.png is file in Resources directory?

Can't find time for making a proper example.

 

But basically everything is explained here
https://vk.com/dev/upload_files?f=%D0%97%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B0%20%D1%84%D0%BE%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%B9%20%D0%BD%D0%B0%20%D1%81%D1%82%D0%B5%D0%BD%D1%83%20%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8F

Get upload server with https://vk.com/dev/photos.getWallUploadServer
Upload the photo using network.upload()
Get it's ID in response.
Include the ID in the attachments field of the wall post.



[TOPIC: post.html]
#18

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Is there a way to get the session's access token after a successful login?

I don't see any reference to it in the docs.
Our app has a server side that will need the access token to make API calls to VK (to get friends list, etc)



[TOPIC: post.html]
#19

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

stanga, hi, please remind me about that feature in a week. At the moment I can't work on the plugin yet.



[TOPIC: post.html]
#20

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Hi Lerg, 

Just bumping the issue with the access token.

It would be great to use your plugin, but we need to know the user's access token in order to do that. 

Thanks!



[TOPIC: post.html]
#21

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

stanga, working on it. Implemented on Android, also updated to latest SDK and added sharing dialog support. Working on iOS implementation.



[TOPIC: post.html]
#22

divol13

[GLOBAL: userInfoPane.html]
divol13
  • Observer

  • 7 posts
  • Corona SDK

Lerg,

Any plans on odnoklassniki api implementation?



[TOPIC: post.html]
#23

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

divol13, I could make it, but I don't think it worth the effort. It's not widely used on mobiles.



[TOPIC: post.html]
#24

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Thank you Lerg!

Please let me know when you're done with iOS, I can't wait to integrate this into our app. 



[TOPIC: post.html]
#25

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 535 posts
  • Corona Staff

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. 




[topic_controls]
Page 1 of 3 1 2 3
 
[/topic_controls]

Also tagged with one or more of these keywords: release, android, ios