5
votes

I am not a professional, but currently, I am using the Twitter API V1 on my website to get basic data from a user's twitter account.

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

However, with the roll out of the Twitter API V1.1 (https://dev.twitter.com/docs/api/1.1), my method of fetching 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 it shows:

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

From my understanding, I need to link it to a twitter app and authenticate, how do I do it?

Am I no longer able to use my usual method of using basic php to fetch a json file? Could someone find me an alternative to fetch user info?

1

1 Answers

0
votes

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

You'll also need to use OAUTH to authenticate before you can make a call to the API. You'll can sign up for an API key at https://dev.twitter.com/