Facebook appMobi调试时没有明显的错误 [英] Facebook appMobi debugging when theres no distinct error

查看:172
本文介绍了Facebook appMobi调试时没有明显的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在appMobi的一个项目上工作,这个项目最近达到了与facebook相关的部分。然而,似乎有太多的移动部件,它几乎不可能分辨出什么在哪里以及如何...更多的是,当一切都在模拟器中工作但不在设备上,没有控制台,没有错误日志没有什么可以解决的问题。

I am working on a project in appMobi, and this project has recently reached it portion that is related to facebook. However there just seems to be soo many moving parts that its virtually impossible to tell whats going on with what where and how.. more so, when everything works in the emulator but not on a device, where there is no console, no error log, nothing to work with to try and figure out the issue.

下图是我在设备上遇到的唯一错误。在尝试与facebook通信时,通过appMobi特定方法。我已经复制并粘贴了那些试图使这项工作的代码,因为我知道一旦我能看到它工作以及它如何工作我就可以开始围绕我真正想要做的事情构建逻辑。那是目前的一个静音点。无论如何,当我在模拟器中运行相同的精确代码时,它的工作方式与预期完全相同。但是在设备本身的Test Anywhere中运行它似乎就是这场冲突的来源。

The image below is the only error I get on my device. When attempting to communicate with facebook, through appMobi specific methods. I have litteraly copied and pasted there code trying to make this work cause I know once I can see this working and how its going to work I can then start building logic around something I actually want to do. That being a mute point at the moment. Anyway, when I run this same exact code in the emulator it works exactly as expected. But running it in Test Anywhere on the device itself seems to be where this conflict is coming in.

所以我想知道,有没有人在堆栈之前有这个问题?如果是这样你做了什么修复它?什么是工作?什么是你调试它的方法,并得出结论,因为我相信我将遇到类似的问题,并在设备上调试也是一个奖金。

Soo I am wondering, has anyone had this issue before out there on stack? If so what did you do to fix it? Whats the work around? Whats the means of how you debugged it and came to the conclusion as I am sure I am going to run into similar problems down the road and debugging on the device is also a bonus.

我的javascript目前:

my javascript currently:

document.addEventListener("appMobi.facebook.login",function(e){
        if (e.success == true) 
        { console.log("Facebook Log in Successful"); } 
        else 
        { console.log("Unsuccessful Login"); }
},false); 

function fbLoginCheckz()
{
 try{
      AppMobi.facebook.login('user_birthday,user_about_me,user_status,offline_access,publish_stream,publish_actions,email,read_friendlists,publish_checkins,create_event');
   }catch(e){
      alert("Error Caught [FB 1]: "+e.message);
   }
}

document.addEventListener("appMobi.facebook.logout",function(e){
        if (e.success == true) 
        { console.log("Logged out of Facebook"); } 
        else 
        { console.log("Unsuccessful Logout"); }
},false); 


var facebookUserID = "me";  //me = the user currently logged into Facebook 
document.addEventListener("appMobi.facebook.request.response",function(e) { 
    console.log("Facebook User Friends Data Returned"); 
    if (e.success == true) { 
        var data = e.data.data; 
        var outHTML = ""; 
        for (var r=0; r< data.length; r++) { 
            outHTML += "<img src='http://graph.facebook.com/" + data[r]["id"] 
            + "/picture' info='" + data[r]["name"] + "' />";        
        } 
    $("#blah").empty().html(outHTML); 
    document.removeEventListener("appMobi.facebook.request.response"); 
 }  
},false); 

my html:

    <br><br>
    <div id="blah"></div>
    <a href="#" onclick="window.location.reload();">RELOAD</a><br>
    <a href="#" onclick="fbLoginCheckz();">LOGIN</a><br>
    <a href="#" onclick="AppMobi.facebook.logout();">LOGOUT</a><br>
    <a href="#" onclick="AppMobi.facebook.requestWithGraphAPI(facebookUserID + '/friends','GET',null);">FRIENDS</a>


推荐答案

构建系统和测试存在问题容器。如果您构建了软件的adHoc版本,它应该可以工作。但是,我所有的随处测试帮助程序应用程序目前仍然存在错误。

There was a problem with the build system and the test containers. If you build an adHoc version of your software it should work. However, all my "test anywhere" helper applications also still have the bug for the time being.

应该会很快对测试容器进行更新,以解决问题。一旦更新,我会尝试回复这里。

There should be an update to the test containers shortly that should fix the problem. I'll try to post back here once they have been updated.

这篇关于Facebook appMobi调试时没有明显的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆