获取instagram页面的基本信息
Get basic information of instagram page
我有多个 instagram pages/urls 不同用户,例如 https://instagram.com/xxxxx/ 等等等等。我想获取该页面的以下信息
name, number of followers, description, bio,
我已经使用访问令牌进行了搜索和显示。但是我很困惑,如果我从我的帐户中获取访问令牌,我该如何获取其他页面的信息?
请指导我该怎么做?
您需要 access token
才能 使用 Instagram API。所以如果你得到 access token
你可以使用 Instagram API.
要获取有关用户的基本信息,请使用:
https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN
{user-id}
是 不是 用户名。要从用户名获取 {user-id}
,请使用:
https://api.instagram.com/v1/users/search?q=[USERNAME]&access_token=[ACCESS TOKEN]
要获得 access token
使用这个:
https://instagram.com/oauth/authorize/?client_id=[CLIENT_ID_HERE]&redirect_uri=http://localhost&response_type=token
最后的响应是这样的:
{
meta: {
code: 200
},
data: {
username: "lanadelrey",
bio: "Put not your trust in princes, nor in the son of man, in whom there is no help",
website: "http://www.lanadelrey.com",
profile_picture: "https://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xpf1/t51.2885-19/10948781_564619503641170_898618667_a.jpg",
full_name: "Lana Del Rey",
counts: {
media: 114,
followed_by: 4207076,
follows: 78
},
id: "305506437"
}
}
我有多个 instagram pages/urls 不同用户,例如 https://instagram.com/xxxxx/ 等等等等。我想获取该页面的以下信息
name, number of followers, description, bio,
我已经使用访问令牌进行了搜索和显示。但是我很困惑,如果我从我的帐户中获取访问令牌,我该如何获取其他页面的信息?
请指导我该怎么做?
您需要 access token
才能 使用 Instagram API。所以如果你得到 access token
你可以使用 Instagram API.
要获取有关用户的基本信息,请使用:
https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN
{user-id}
是 不是 用户名。要从用户名获取 {user-id}
,请使用:
https://api.instagram.com/v1/users/search?q=[USERNAME]&access_token=[ACCESS TOKEN]
要获得 access token
使用这个:
https://instagram.com/oauth/authorize/?client_id=[CLIENT_ID_HERE]&redirect_uri=http://localhost&response_type=token
最后的响应是这样的:
{
meta: {
code: 200
},
data: {
username: "lanadelrey",
bio: "Put not your trust in princes, nor in the son of man, in whom there is no help",
website: "http://www.lanadelrey.com",
profile_picture: "https://igcdn-photos-c-a.akamaihd.net/hphotos-ak-xpf1/t51.2885-19/10948781_564619503641170_898618667_a.jpg",
full_name: "Lana Del Rey",
counts: {
media: 114,
followed_by: 4207076,
follows: 78
},
id: "305506437"
}
}