- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我正在尝试在我的网络应用程序上实现 Google plus 注册,并且我按照谷歌文档设置注册但是当我在接受权限并使用返回给我的任何 api restcall 后尝试注册时make 返回超出未验证使用的每日限制。继续使用需要注册错误。我已经使用 ouath 2.0 key 注册了我的应用程序,所以我似乎没有明白我做错了什么。这是我的代码。
城市方面:
const clientId = "5XXX000XX.apps.googleusercontent.com";
const apiKey = "AIzaSyCAXE5JSa36jcC*X7HV40SBcIWBiVGUTBE";
const scopes = "https://www.googleapis.com/auth/plus.login";
let accessToken = null;
function initer() {
gapi.client.setApiKey(apiKey);
// alert("Hello init");
if ($("#authorize-button").length > 0) {
$("#authorize-button").click(onLoginClick);
}
}
function onLoginClick() {
// $("#modalLoading").modal();
// alert("yeah");
gapi.auth.authorize({ client_id: clientId, scope: scopes, immediate: false }, onConnect);
}
function onConnect(authResult) {
// alert("On connect");
if (authResult && !authResult.error) {
alert("Hey");
accessToken = authResult.access_token;
triggerLogin();
} else {
alert("Error");
}
}
triggerLogin = function() {
alert("Triggering login");
$("#modalLoading").modal();
$.ajax({
url: window.config.site_root + "account/google_login",
type: "POST",
data: "access_token=" + accessToken,
success: onLogin,
error() {
onError("Logging In", "starting your session");
},
});
};
onLogin = function(login) {
alert("Login start");
$("#modalLoading").modal("hide");
if (login.operation) {
location.reload();
} else {
alert("Register will start");
triggerRegistration();
}
};
triggerRegistration = function() {
$("#modalLoading").modal();
$.ajax({
url: window.config.site_root + "account/google_registration",
type: "POST",
data: "access_token=" + accessToken,
success: onRegistration,
error() {
alert("An Error");
},
});
};
onRegistration = function(data) {
alert("Handling register");
$("#modalLoading").modal("hide");
if (data.account_exists) {
stage.showErrorModal(
"Account already registered",
"There is already an account with that email address, are you sure you created an account using this login method?",
);
} else if (data.operation) {
alert("Login now");
triggerLogin();
} else {
alert("Error");
onError("Registering", "creating your account");
}
};
这是我的服务器端代码
public function google_registration()
{
$access_token = (isset($_POST["access_token"]) && !empty($_POST["access_token"])) ? $_POST["access_token"] : null;
$name = null;
$email = null;
$account_id = null;
$picture = null;
$gender = null;
try
{
if($access_token)
{
$me = file_get_contents("https://www.googleapis.com/plus/v1/people/me?access_token=".$access_token);
if($me)
{
$me = json_decode($me);
$name = $me->name.formatted;
$email = $me->email;
$account_id = $me->id;
$picture = $me->image;
$gender = ($me->gender == "female") ? 1 : 0;
}
}
}
catch(Exception $error)
{
// let the system handle the error quietly.
}
return $this->service_registration("google", $name, $email, $account_id, $picture, $gender);
}
最佳答案
我也遇到了同样的错误 - “已超过未经身份验证使用的每日限制。继续使用需要注册”。
我在 API 下检查了我的谷歌开发者控制台,查看与 API key /授权 key 关联的项目,例如 https://console.developers.google.com/project/<your app id>/apiui/api
. Google+API 的状态设置为关闭。我把它打开了。
然后我得到了另一个访问 token ,然后尝试使用新的。它起作用了,即错误消失了,我得到了配置文件的详细信息。为了交叉检查这是否确实是错误的原因,我回到控制台并禁用了 Google+ API。但是现在,我得到了错误:
“未配置访问。请使用 Google Developers Console 为您的项目激活 API。”
因此,我不能 100% 确定这是在我的开发者控制台中打开/关闭了 Google+ API,但请确保它已打开。另外,开机后等待几分钟,并确保每次都获得一个新的 token ,然后再尝试。
关于javascript - 尝试在我的网络应用程序上使用 google plus 登录时,不断收到 "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19335503/
如果我调用会发生什么变化 schedule->call(function() { .. do something ... })->daily() 如果我打电话 schedule->job(... my
Google Play 控制台中有一个名为“安装事件”(每日安装事件)的新指标。我只是将这些指标与经典的“用户安装量”进行了比较(我有法语版的控制台,我认为控制台上的英文翻译是每日“每个用户的安装量”
题目地址:https://leetcode.com/problems/daily-temperatures/description/ 题目描述 Given a list of daily temp
这个问题在这里已经有了答案: "TypeError: string indices must be integers" when getting data of a stock from Yahoo
嘿嘿,我知道如何在 SharedPreferences 中保存变量和其他数据,但我想知道如何每天递减一个变量。 这个 var (int) 已经在共享首选项中,并且我们每天递减 -1。 例如,我知道用户
我需要让我的 Java 程序每天在 linux 机器上运行一次。所以我创建了一个只有一行的简单文件: java -jar /opt/location/my_jar.jar 并将它放在 etc/cron
我在 cron.daily 中有几个 cron 作业,它们应该每天执行。我知道这些任务已执行,因为我可以看到最终结果。例如:我正在备份 MySQL 数据库,我可以看到备份文件。但是,我找不到这方面的日
我的 CentOS 7.4 安装了 logrotate 3.8.6。我在 /etc/logrotate.d/ 下有一个自定义 logrotate 文件,用于轮换安装在同一台机器上的 Tomcat(例如
我一直在摆弄cron。如果您安排一个脚本每天运行,而您的计算机在 acron 安排它时关闭,如果您在当天晚些时候打开您的计算机,它会运行吗? 最佳答案 cron.daily 计划每天在特定时间运行一次
我们目前正在为本地报纸准备 iPhone 应用程序。几周后,该报将在其网站上实现付费内容和免费内容。计划将有多种方式购买此内容: 单篇文章 每日订阅 每月订阅 按年订阅 还应允许注册用户访问 iPho
我有一个脚本可以每天随时运行。所以/etc/cron.daily似乎是一个简单的解决方案。 但是现在我遇到了问题,cronjob 不会运行该脚本。似乎 cronjob 不会运行任何日常工作。 所以我试
有谁知道如何获取Bing“每日手机壁纸”地址。如果您通过 iPhone 访问 bing.com,您将看到漂亮的壁纸。Bing 每天都会更改,并提供纵向和横向两种分辨率格式。 比如今天的Bing手机壁纸
我正在尝试创建一个循环异步任务来调用带有 JobScheduler 和 JobService 的 Web 服务。但我的想法是尝试每天执行一次此任务,并且始终在同一时间执行。甚至可以让用户更新任务启动日
我在数据库中有一个表statistics: CREATE TABLE `statistics` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `ti
当我在 Android Developer Console 中查看我的“每日设备安装量”时,这些数字与 Google 支付的费用没有任何相似之处。 任何人都可以阐明这一点吗?例如,根据 Google
我正在尝试实现本地通知 这是我设置的 // Current date NSDate *date = [NSDate date]; // Add one minute to th
我在 Spring 应用程序中通过 Lombok 和 @Slf4j 注释使用 Logback,因此我的日志记录配置在 logback-spring.xml 文件中。一般日志记录工作正常,但问题是我正在
在this tutorial在 Daily inspirations 的部分,他说: $quote = array( 1 => "Quote 1", 2 => "Quote 2", 3 => "Quo
我有使用 Net::Finger 的 perl 程序并已从 cron.daily 成功运行在 Fedora 11 中。 我刚刚将服务器升级到 Fedora 18,这些相同的 perl 程序不再从 cr
我以每月 25 美元的价格升级到“Flame”订阅,因为它支持 Daily private backups . 日常备份应该上传到 Google Cloud Storage 或 Amazon S3。
我是一名优秀的程序员,十分优秀!