How to get user image with Twitter API 1.1?

后端 未结 6 2080
眼角桃花
眼角桃花 2020-12-02 17:45

In API 1.0, we can use users/profile_image/:screen_name

For example : http://api.twitter.com/1/users/profile_image/EA_FIFA_FRANCE

B

6条回答
  •  一生所求
    2020-12-02 18:18

    You say you want to use Twitter API 1.1 and yet you don't want to authenticate your requests. Unauthenticated requests are not supported in API v1.1. So please adjust to the API change. See updates :

    • https://dev.twitter.com/blog/planning-for-api-v1-retirement
    • https://dev.twitter.com/docs/rate-limiting/1.1

    You can get image from profile_image_url field of https://api.twitter.com/1.1/users/show.json request. Either a id or screen_name is required for this method. For example :

    GET    https://api.twitter.com/1.1/users/show.json?screen_name=rsarver
    

    See details here https://dev.twitter.com/docs/api/1.1/get/users/show

提交回复
热议问题