With Python 3, I want to read a JSON from url. This is what I got:
import json
import urllib.request
url_address = 'https://api.twitter.com/1.1/statuses/user_timeline.json'
with urllib.request.urlopen(url_address) as url:
data = json.loads(url.read())
print(data)
However, it gives: HTTPError: HTTP Error 400: Bad Request
{"errors":[{"code":215,"message":"Bad Authentication data."}]}{"errors":[{"message":"The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.","code":64}]}