【问题标题】:Get basic information of instagram page获取instagram页面的基本信息
【发布时间】:2015-06-29 19:53:46
【问题描述】:

我有许多不同用户的 Instagram 页面/网址,例如 https://instagram.com/xxxxx/ 等。我想获取该页面的以下信息

name, number of followers, description, bio,

我已使用访问令牌进行搜索并显示所有内容。但是如果我会从我的帐户中获取访问令牌,我会感到困惑,我如何获取其他页面的信息?

请指导我该怎么做?

【问题讨论】:

    标签: php instagram instagram-api


    【解决方案1】:

    您需要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"
        }
    }
    

    【讨论】:

    • @AwaisQarni 是的,你可以。你只需要他们的{user-id}。我解释了如何获得它。
    • 这正是我所需要的
    猜你喜欢
    • 2017-10-02
    • 2013-01-03
    • 1970-01-01
    • 1970-01-01
    • 2018-04-10
    • 2014-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多