duanfu9523 2013-05-07 15:39
浏览 77
已采纳

Google API重定向将我的应用发送到错误的页面

I released an app using the Google Mirror API. Now I am trying to set up a beta app at a new web address .info as opposed to .com. However with I authorize my app from the .info address I get redirected to the .com. I have triple checked the address in my code and my client ids and secrets. What could cause this? I am going to attach a screen shot of my API settings even though it looks like a top secret government document about aliens or something.

https://code.google.com/apis/console

This is where the client is called from.

 $client = new Google_Client();

  $client->setApplicationName($app_name);

  // These are set in config.php
  $client->setClientId($api_client_id);
  $client->setClientSecret($api_client_secret);
  $client->setDeveloperKey($api_simple_key);
  $client->setRedirectUri($base_url."/oauth2callback.php");

  $client->setScopes(array(
    'https://www.googleapis.com/auth/glass.timeline',
    'https://www.googleapis.com/auth/glass.location',
    'https://www.googleapis.com/auth/userinfo.profile'));

I know that the $base_url, $api_client_key and $api_client_secret are correct.

  • 写回答

2条回答 默认 最新

  • dongyunqin7307 2013-05-07 19:24
    关注

    Well I guess there was no way for someone to answer this question because it was unrelated to the code or Google APIs. The person who set up our web server had set Apache to rewrite https traffic to the .com address. It was hard to spot because there were duplicate files in both directories.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 我想在一个软件里添加一个优惠弹窗,应该怎么写代码
  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流