Represents a collection of the most popular photo and video IG Media objects that have been tagged with a hashtag.
Popularity is determined by a mix of views and viewer interaction using the same methodology that determines the top posts when searching for a hashtag on www.instagram.com.
在 2021 年 9 月 7 日前,对于 10.0 及以下版本的调用:如果多媒体素材的所有者已隐藏相关内容获得的点赞数量,则 Instagram 媒体上的 like_count
字段现将返回 0
。
在 2021 年 9 月 7 日前,对于 11.0 及以上版本的调用和所有版本:如果通过另一个端点或字段扩展间接查询 Instagram 媒体,则在多媒体素材拥有者已隐藏获赞数的情况下,API 响应将忽略 like_count
字段。若是直接查询 Instagram 媒体(只能由 Instagram 媒体所有者进行),即使已隐藏获赞数,系统仍会返回实际的获赞数。
This operation is not supported.
GET /{ig-hashtag-id}/top_media?user_id={user-id}&fields={fields}
Returns the most popular photo and video IG Media objects that have been tagged with the hashtag.
{user_id}
(required) — The ID of the Instagram Business or Creator Account performing the query.{fields}
— A comma-separated list of fields you want returned. See Returnable Fields.limit
of 50 results per page.username
field on returned media objects.after
cursor for paginated results; a before
cursor will not be included. In addition, the after
cursor value will always be the same for each page, but it can still be used to get the next page of results in the result set.Requirements
Type | Description |
---|---|
If the token is from a User whose Page role was granted via the Business Manager, one of the following permissions is also required: | |
A User access token of a Facebook User who has been approved for tasks on the connected Facebook Page. |
An array of IG Media objects. Excess results will be paginated.
You can use the fields
parameter to request the following fields on returned media objects:
caption
children
(only returned for Album IG Media)comments_count
id
like_count
(v10.0 and older calls: value will be 0
if the media owner has hidden like counts it. v11.0+ calls: field will be omitted if media owner has hidden like counts in it.)media_type
media_url
(not returned for Album IG Media)permalink
timestamp
(only available on v7.0+)GET graph.facebook.com/17873440459141021/top_media ?user_id=17841405309211844 &fields=id,media_type,comments_count,like_count
{ "data": [ { "id": "17880997618081620", "media_type": "IMAGE", "comments_count": 84, "like_count": 177 }, { "id": "17871527143187462" "media_type": "IMAGE", "comments_count": 24, "like_count": 57 }, { "id": "17896450804038745" "media_type": "IMAGE", "comments_count": 19, "like_count": 36 }, ... // Results truncated for clarity ], "paging": { "cursors": { "after": "NTAyYmE4..." }, "next": "https://graph.facebook.com/..." } }
This operation is not supported.
This operation is not supported.