我将通过以下Instagram API嵌入登录用户的一些媒体:
https://api.instagram.com/oembed?url=http://instagr.am/p/fA9uwTtkSN/
但是它需要短链接或者至少是短代码来生成链接。不幸的是,使用下面的API既不返回短链接,也不返回短代码。
https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
有办法解决这个问题吗?
发布于 2016-07-26 16:37:33
在JSON响应中,有一个"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"
},
....
https://stackoverflow.com/questions/38582641
复制相似问题