django-social-auth から取得した OAuth トークンを使用して、ユーザーのカレンダーにアクセスしようとしています。
だから私が設定したdjango-social-auth構成で:
GOOGLE_CONSUMER_KEY = 'anonymous'
GOOGLE_CONSUMER_SECRET = 'anonymous'
GOOGLE_OAUTH_EXTRA_SCOPE = ['https://www.google.com/calendar/feeds/']
ユーザーが Google から戻ってくると、データベースに次のようなエントリが表示されます。
{u'access_token': u'oauth_token_secret=vvvv&oauth_token=xxxx'}
しかし今、私がこのようなことをしようとすると:
import gdata.calendar.client
client = gdata.calendar.client.CalendarClient()
client.auth_token = gdata.gauth.OAuthHmacToken('anonymous', 'anonymous', 'xxxx', 'vvvv', gdata.gauth.ACCESS_TOKEN)
client.GetOwnCalendarsFeed()
私はいつも得る:
gdata.client.Unauthorized: Unauthorized - Server responded with: 401
<HEAD>
<TITLE>Token invalid - Invalid AuthSub token.</TITLE>
</HEAD>
ここで何が欠けていますか?