Twitter API error 215

前端 未结 2 1603
心在旅途
心在旅途 2020-11-28 09:42

Today, we discovered one of my clients Twitter feeds became broken.

I have tried switching to using the new API 1.1, but get the following error:

{\"         


        
相关标签:
2条回答
  • 2020-11-28 10:06

    Your example doesn't state whether you are authenticating, so I will assume you are not.

    All methods in API 1.1 require authentication via OAuth. https://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a

    Unauthenticated access is discontinued permanently.

    0 讨论(0)
  • 2020-11-28 10:12

    So, it seems Twitter's latest API 1.1 does not allow access without authentication - even for data that is seemingly public...like the latest 3 tweets from a timeline.

    The best article I have found on this (which gives a great solution) for read-access can be found here:

    http://www.webdevdoor.com/php/authenticating-twitter-feed-timeline-oauth/

    I have followed the steps in the article above and can confirm it works great.

    An interesting point to note, is that now, because you have to use access tokens and secret keys; all requests must be made with a server-side script. Prior to this I was using jQuery to make an AJAX request on Twitters JSON API directly. Now, you must AJAX request a dynamic script on your own website, if you wish to go down a Javascript route.

    0 讨论(0)
提交回复
热议问题