Instagram从userId获取用户名 [英] Instagram get username from userId
问题描述
我可以从用户名中获取用户名,但不能从用户名中获取用户名.
I have the ability to get userId from username, but I do not have the ability to get username from userId.
我有一个userId数据库,因为这是我的应用程序正常运行所需要的,但是我想知道这些用户是谁或查看他们的个人资料.否则,我必须更新我的应用程序,才能将用户名写入新列中的数据库,从而占用了应用程序本身并不需要的空间
I have a database of userId because that is all my app needed to function, but I want to know who these users are or look at their profiles. I have to otherwise update my app to write the username to the database in a new column, taking up space that the app itself doesn't really need
推荐答案
Instagram为此公开了一个用户端点.来自 http://instagram.com/developer/endpoints/users/#get_users ,您可以使用:
Instagram exposes a User Endpoint for that. From http://instagram.com/developer/endpoints/users/#get_users, you can use:
https://api.instagram.com/v1/users/(user id)/?access_token=ACCESS-TOKEN
响应为JSON,所需数据为data.username
The response is JSON and the data you want is data.username
这篇关于Instagram从userId获取用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!