Возможно ли как то отправлять запись другу ?
Код: Выделить всё
<script src="http://vkontakte.ru/js/api/openapi.js" type="text/javascript"></script> <div id="login_button" onclick="VK.Auth.login(authInfo);"></div> <select id="friends"></select> <button onclick="test()">отправить</button> <script language="javascript"> function test() { var user_id = document.getElementById("friends").value; var post = { owner_id: user_id, message: 'FORUM APP test' } VK.Api.call('wall.post', post, function(r) { if (r.response) { console.log(r.response.post_id); } }); // alert(user_id); } VK.init({ apiId: 3027147});function authInfo(response) { if (response.session) { // alert('user: '+response.session.mid); VK.api('friends.get',{fields:"uid, first_name, last_name, nickname, sex, photo_medium"},function(data) { if (data.response) { for(i=0; i<data.response.length; i++) { document.getElementById("friends").innerHTML += '<option value="'+data.response[i].uid+'">'+data.response[i].first_name+' '+data.response[i].last_name+'</option>'; } } else alert(1); }); } else { alert('not auth'); }}VK.Auth.getLoginStatus(authInfo);VK.UI.button('login_button');</script>