如何从 Instagram API 中找到媒体的 SHORTCODE 或 SHORTLINK?
How to find SHORTCODE or SHORTLINK of a media from Instagram API?
我将通过关注 Instagram 嵌入已登录用户的一些媒体 API:
https://api.instagram.com/oembed?url=http://instagr.am/p/fA9uwTtkSN/
但它需要短 link 或至少短代码才能生成 link。不幸的是,在 API 下既没有使用 returns 短代码 link 也没有短代码。
https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
有什么解决办法吗?
在JSONAPI响应中有一个"link",即短链接url:
{
"data": [{
"comments": {
"count": 0
},
"caption": {
"created_time": "1296710352",
"text": "Inside le truc #foodtruck",
"from": {
"username": "kevin",
"full_name": "Kevin Systrom",
"type": "user",
"id": "3"
},
"id": "26621408"
},
"likes": {
"count": 15
},
"link": "http://instagr.am/p/BWrVZ/",
"user": {
"username": "kevin",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
"id": "3"
},
....
我将通过关注 Instagram 嵌入已登录用户的一些媒体 API:
https://api.instagram.com/oembed?url=http://instagr.am/p/fA9uwTtkSN/
但它需要短 link 或至少短代码才能生成 link。不幸的是,在 API 下既没有使用 returns 短代码 link 也没有短代码。
https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
有什么解决办法吗?
在JSONAPI响应中有一个"link",即短链接url:
{
"data": [{
"comments": {
"count": 0
},
"caption": {
"created_time": "1296710352",
"text": "Inside le truc #foodtruck",
"from": {
"username": "kevin",
"full_name": "Kevin Systrom",
"type": "user",
"id": "3"
},
"id": "26621408"
},
"likes": {
"count": 15
},
"link": "http://instagr.am/p/BWrVZ/",
"user": {
"username": "kevin",
"profile_picture": "http://distillery.s3.amazonaws.com/profiles/profile_3_75sq_1295574122.jpg",
"id": "3"
},
....