我尝试使用以下代码向 Salesforce 授权我的帐户:
data = {
'client_id': settings.CONSUMER_KEY,
'client_secret': settings.CONSUMER_SECRET,
'redirect_uri': 'https://DOMAIN.com/salesforce/auth/',
'grant_type': 'authorization_code',
}
data = urllib.urlencode(data)
result = urllib2.urlopen('https://SALESFORCEDOMAIN.com/services/oauth2/token', data).read()
但仍然收到错误的请求错误。我应该改变什么?