W
W
wedo2019-03-27 11:58:16
Classmates
wedo, 2019-03-27 11:58:16

How to get the correct image link from a post?

Good afternoon. Posts from the group page in classmates are read via api. If an image is attached to the post, then instead of a link to this image, a link to the preloader is returned. Can someone explain this api behavior? Is it possible to accurately get the link to the attached image?
Below is the api request and response information.
I make a discussions.get request
. In response, I get json, in which elements of the form
{
"discussion": {
"title": "sbeve 1",
"message": "Subject",
"object_type": "GROUP_TOPIC",
"object_id": " 123",
"creation_date": "2019-03-27 11:18:23",
"last_activity_date":
"new_comments_count": 0,
"total_comments_count": 0,
"like_count": 0,
"liked_it": false,
"ref_objects": [
{
"type": "GROUP",
"id": "123"
}
],
"attrs ": {
"flags": "c,l,s,unsb"
}
},
"entities": {
"themes": [
{
"id": "123",
"title": "sbeve 1",
"images" : [
{
"type": "group",
"id": "123",
"pic50x50": " https://i.mycdn.me/image?id=867891877674&t=32&plc=... ",
"pic128x128": "https://i.mycdn.me/image?id=867891877674&t=23&plc=... ",
"pic640x480": " https://i.mycdn.me/image?id=867891877674&t=0&plc=A... ",
"group_id": "123",
"author_type": "GROUP"
}
],
"attrs": {
"p": 1
}
}
],
"groups": [
{
"uid": "123",
"name ": "Group"
}
]
}
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question