Google Oauth for YouTube : Why do I get “Undefined index: oauth_token” ( Jim S.' code )

℡╲_俬逩灬. 提交于 2019-12-02 09:31:26

Honestly i am not sure how Session will be managed by PHP code so will be of little help for you. It seems that this line is the cause

$oauth = $this->google_oauth->get_access_token(false, $token_secret);

you are trying to get access_token from the Google to send request to Google API to get user information who ever authorize your application and i guess Google is not returning what has been expected from them. this can be due to type mismatch in the request data as what Google Oauth is expecting from you and what actually you are sending

In you case i would have used debugger of my Eclipse to see what exactly is going on but for OAuth i already told you in earlier question

  1. You need to store that token you getting at your first step.
  2. Once your user is back from authenticate them-self you need to get access_token using that request token
  3. Once you have request token you are ready to make final API call and it seems that some how your code is failing to get the data from session
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!