D
D
DeusModus2012-03-27 17:59:33
PHP
DeusModus, 2012-03-27 17:59:33

Simple check for user existence (VK API)?

Hello.
What is the easiest way to check on the backend whether the correct data is coming from the application (IFRAME)?
More specifically, does the access_token match the user(viewer_id). And then the app gives me discounts - I don’t want the uid substitution to give a new discount.
Google search shows a bunch of options with authorization, but this is not quite right.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
carbonariy, 2012-03-27
@DeusModus

Calculate and compare auth_key vk.com/developers.php?id=-1_27971896&s=1

D
Danila Buyanov, 2012-03-27
@DanyBoo

uid is the id of the current user?
if yes, then you can make the first request to the API when loading (there is such a setting right in the contact) for example like this:
method=getProfiles&uids={viewer_id}&format=json&v=2.0&fields=photo
then when loading you already have in get['viewer_id '] real ID.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question