- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在 Mac OSX 上构建一个供个人使用的小型 Instagram 客户端。我目前正在使用 gtm-oauth2 从 Instagram 获取 oauth2 token 。我正在按照源代码提供的指南获取此 token 。我已经完成了 90% 的工作。 webView 加载了身份验证详细信息,我可以输入我的帐户,然后出现权限屏幕询问我是否愿意授予我的应用程序访问权限。我遇到的问题是,在进行身份验证后,无论我是“允许”还是“取消”,应用程序都会崩溃,没有堆栈跟踪或其他信息。我得到的关于异常的唯一信息是“Thread 1: EXC_BAD_ACCESS (code = 1, address=0x4c1)”,看起来线程正在做一些与 WebCore::ResourceLoader 有关的事情,但它是一堆 ASM 所以我不知道这个电话实际发生在哪里。也许我没有正确调用 windowController?我的代码包含在下面。
- (void)signIntoInstagram {
NSURL *tokenURL =[NSURL URLWithString:kTOKENIURl];
// Set up the OAuth request
GTMOAuth2Authentication *auth = [GTMOAuth2Authentication
authenticationWithServiceProvider:@"Instagram"
tokenURL:tokenURL
redirectURI:kREDIRECTURI
clientID:KCLIENTID
clientSecret:KCLIENTSERCRET
];
// Specify the appropriate scope string, if any, according to the service's API documentation
auth.scope = @"basic";
NSURL *authURL = [NSURL URLWithString:KAUTHURL];
// Display the authentication view
GTMOAuth2WindowController *windowController;
windowController = [GTMOAuth2WindowController controllerWithAuthentication:auth
authorizationURL:authURL
keychainItemName:kKeychainItemName
resourceBundle:nil];
// optional: display some html briefly before the sign-in page loads
NSString *html = @"<html><body><div align=center>Loading sign-in page...</div></body></html>";
[windowController setInitialHTMLString:html];
[windowController signInSheetModalForWindow:_window
delegate:self
finishedSelector:@selector(windowController:finishedWithAuth:error:)];}
如果我在 windowController:finishedWithAuth:error: 方法中插入一个断点,应用程序就会到达它。但是,在我运行后它仍然崩溃,在我看来这似乎是某种异步操作导致了错误。希望我只是在这里遗漏了一些简单的东西;我无法想象 Google 的 OAuth 项目存在重大缺陷。
最佳答案
遇到同样的问题后,我在 Google 群组上找到了这个 https://groups.google.com/forum/#!msg/gtm-oauth/N6jlOpL9k5g/n4TdrTJyxzcJ .还记录了一个问题 https://code.google.com/p/gtm-oauth/issues/detail?id=11
基本上我注释掉了 GTMOAuth2WindowController.m 的第 331 行并且它起作用了。您还可以对该问题投上您的一票,也许 Google 会解决它。
关于objective-c - 使用 Instagram API 进行身份验证时,gtm-oauth2 在 Mac OSX 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22468877/
几周前,我将我的 Google 标签管理器容器迁移到 GTM v2(Android 和 iOS)。自从我这样做以来,我一直无法设置任何移动分析实验。 我已将容器连接到分析 View ,并在创建实验时选
我遇到了问题,我似乎无法找到解决方法。情况如下营销部门想整合GTM。这很好,因为他们希望完全控制他们希望集成的不同第三方提供商。但是为了实现这一点,他们希望能够跟踪页面上的所有点击。 他们告诉我,目前
我想创建一个postgres-xl 集群。该集群包括 5 个节点、1 个 GTM、2 个 Coordinator 和 2 个 Datanode。以下是节点的详细信息 GTM: hostname=l
我正在客户网站上实现 Google 跟踪代码管理器脚本。 我遇到了一个随机问题:dataLayer 没有获得它的 gtm.dom 和 gtm.load 对象。它只有两个对象,一个包含我正在传递的一堆变
这是我在这个网站上的第一个问题,我很好奇是否有人可以帮助我。在 Google 跟踪代码管理器中,我尝试使用一些 jQuery 设置自定义 JavaScript 变量,该变量应返回特定数组中所有产品价格
我在我的 chrome 扩展页面中添加了这个 gtm 代码(由内容脚本和 iframe 注入(inject)) // (function(w,d,s,l,i){w[l]=w[l]||[];w[l].
在 GTM 中编写一个小的自定义 javascript 宏以在单击出站链接时设置类别值。大多数内部链接都是相对 URL。 function(){ var eventCat = ""; if({{ele
我在任何地方都找不到这个问题的答案。我正在尝试在 Google 跟踪代码管理器中设置触发器和事件标记,以便在内容存在时触发。本质上,我正在 Google Analytics 中为产品 View 创建一
坐在一个我正忙着标记的网站上,上面有这个凌乱的小面包屑...... li class="home" itemprop="itemListElem
我的目标是在 Firebase Analytics 中获取应用数据,在 Google Universal Analytics 中获取其他自定义数据和应用数据。 我的问题是我是否在我的应用上安装 Fir
GTM 已启动并正在运行,主 UA 标记与 ClickListener 标记一起就位。 为了减少宏的数量,我使用 dataLayer 变量宏来表示事件类别、操作、标签、值和交互,因此它们可以用于许多规
为什么我的 GA View 中没有任何数据?编译 'com.google.android.gms:play-services-location:9.4.0' 所有写入/复制都像手册中一样(https:
我正在尝试跟踪使用 GTM 单击按钮后出现的元素,但使用元素可见性触发器根本不会触发。我为一些点击设置了 GTM,它运行良好,但我对这个可见性触发器感到困惑。我尝试切换 Observe DOM cha
我正在尝试在 GTM 中设置一个悬停事件标记,而不对页面上的代码进行任何更改,因此纯粹是通过 GTM。 我尝试使用 GTM Hover Recipe来自 Bounteous,但我似乎无法触发自定义事件
我有Pageview Google 标签管理器中跟踪 SPA 页面浏览量的标签,与 this guide 中描述的标签相同.基本上它是 Universal Analytics 与在 History C
在网站 GTM 实现中,您可以使用 javascript 创建自己的自定义标签,因此只需使用 GTM 界面即可轻松设置对您自己的系统的 Web 服务调用等。 现在对于 Firebase - GTM 实
我正在尝试发送 screen-view hits至Google Analytics使用 Google Tag Manager ,但在实时 View 中,屏幕名称值显示为 (not set) .实际的屏
我目前有一个带有相关文章元素的表单,该元素在填写表单主题时建议用户相关文章。 我正在 try catch 单击相关文章的所有表单提交。 我创建了 2 个触发器和 2 个标签: 一旦用户点击其中一篇相关
我正在根据 google documentation 实现购买跟踪. 我对购买标签配置有一个小问题。 如果我使用提供的配置创建标签: Tag type : Universal Analytics Tr
我使用 Google 标签管理器已经有几个星期了。最近我有一个特殊的要求,我还没有找到答案。是否有可能多个容器共享同一个数据层?在两个容器的Js代码中,我试图给datalayer一个同名:结果比较出人
我是一名优秀的程序员,十分优秀!