Twitter JSON API in Android development

I started working on Android Development for a while. According to the tutorials, they should be trying to remove JSON information from the Twitter API ...

As instructed in the tutorial, this is the code to use:

" http://api.twitter.com/1/statuses/user_timeline.json?screen_name= write username "

HOWEVER, I got a response saying that the API is no longer available, and I should upgrade to API v1.1.

Could someone help on what to do to replace url, I was instructed to use ??

Note When I used the new url from API v1.1: " https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twitterapi&count=2 "

I get the following:

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

+4
source share
1 answer

The old Twitter API does not require authentication to retrieve user_timeline , but v1.1 requires authentication to retrieve data ( https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline ). According to the Twitter API, all user API v1.1 requests require user authentication.

Read more about authentication here. https://dev.twitter.com/docs/auth/oauth#v1-1

+1
source

Source: https://habr.com/ru/post/1495166/


All Articles