Answer the question
In order to leave comments, you need to log in
Why is there an empty array in the response when using the fields field in the photos.getPhotos method?
In the photos.getPhotos method, I specify the list of requested fields in the fields parameter. In the response, an empty array comes in the photos parameter. What could be the problem?
Answer the question
In order to leave comments, you need to log in
I can share my working function here, I specially changed the application_key, so it is not working
function TSpamThread.API_photos_getPhotos: string;
varUA:String;
begin
if userAlbums.Count>0 then UA:=userAlbums[random(useralbums.Count)];
poststr:='gid='+api_gid+'&aid='+UA+'&fields=group_photo.*&count=50&application_key=CAFJIICABBABABA&format=json
&session_key='+sessionkey;
md5str:=sortmd5(poststr)+seskey;
md5str:=md5(md5str);
try
response.Text:=idhttp.Get(' api.odnoklassniki.ru/api/photos/getPhotos? '+poststr+'&sig='+md5str);
except exit; end;
albumPhotos.Text:=pasrsegroup('"id":"','"',response.Text);
if albumPhotos.Count>0 then result:=albumPhotos[random(albumPhotos.
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question