A
A
Andy Vo2014-10-31 16:57:10
JavaScript
Andy Vo, 2014-10-31 16:57:10

How to check the selected settings in the Vkontakte iframe application?

Good day.
There is an iframe VK application and you need to access the user's wall.
Actually, it turns out to display a request for obtaining access rights to the wall, but it’s not good if this request is displayed every time the application is launched. Accordingly, it is necessary to check what settings are currently selected for the user.
My validation code

VK.api("account.getAppPermissions", {user_id:10} ,function(data) {
if(data.response < 8450) {
document.getElementById('top-start-text').innerHTML = data.parse(' score');
VK.callMethod("showSettingsBox", 8450);
}
});

And it doesn't work. I would be grateful if someone can help with advice or working code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2014-10-31
@Sanasol

user_id 10?
do a console.log(data) first to understand what the query returns.
Can be incorrectly counted a mask (the sum in sense) the rights?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question