Get information using Twitter API v.1.1

I'm not a professional, but I'm currently using the Twitter V1 API on my website to retrieve basic data from a Twitter user account.

I am using basic json to extract content from https://api.twitter.com/1/users/show.json?screen_name=katyperry and it works.

However, with the exit from the Twitter API V1.1 ( https://dev.twitter.com/docs/api/1.1 ) my method of extracting data is no longer possible.

I tried ( https://dev.twitter.com/docs/api/1.1/get/users/show ), I can’t even enter the page https://api.twitter.com/1.1/users/show.json ? screen_name = verified shows:

{"errors":[{"message":"Bad Authentication data","code":215}]}

From my point of view, I need to connect it with the twitter application and verify the authenticity, how can I do it?

Can't I anymore use my usual method of using basic php to extract a json file? Can someone find me an alternative to get user information?

+5
source share
1 answer

For starters, you will need to change the URL to https://api.twitter.com/1.1/followers/ids.json?screen_name=katyperry

You also need to use OAUTH for authentication before you can call the API. You can subscribe to the API key at https://dev.twitter.com/

0
source

All Articles