Код: Выделить всё
for (i=1; i<=count; i++){ if (data[i]['attachment']['photo'] == null) { if (data[i]['text'] == null){ }else{ VK.api('wall.post', {owner_id:'-28746702',message:data[i]['text']}, okk, onError); } }else{ if (data[i]['text'] == null){ VK.api('wall.post', {owner_id:'-28746702',attachment:data[i]['attachment']['photo']['src']}, okk, onError); }else{ VK.api('wall.post', {owner_id:'-28746702',message:data[i]['text'],attachment:data[i]['attachment']['photo']['src']}, okk, onError); } }
Код: Выделить всё
VK.api('wall.get', {owner_id:'-groupID'}, onProfileLoaded, onError);