I
I
Igor Kalmykov2017-02-15 16:34:21
Classmates
Igor Kalmykov, 2017-02-15 16:34:21

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

1 answer(s)
A
Alexey Semenyuk, 2017-02-16
@wonchoe

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 question

Ask a Question

731 491 924 answers to any question