发生一个错误,请稍后重试(实的PhoneGap插件,Android版) [英] An Error Occur Please Try Again Later(phonegap facebook plugin-android)

查看:155
本文介绍了发生一个错误,请稍后重试(实的PhoneGap插件,Android版)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每one..i有从GitHub和放大器的一个问题,而乳宁的PhoneGap Facebook的plugin.i已经下载的PhoneGap Facebook的SDK;我按照项目documentation.steps我做给步骤是

every one..i have one issue while runing phonegap facebook plugin.i have Downloaded phonegap facebook sdk from GITHUB & i have followed steps given on project documentation.steps i have done is

1)我创建的PhoneGap项目1.4.1

1) i have created phonegap project with phonegap vesrsion 1.4.1

2)我下载的Facebook为PhoneGap的版本1.4.1从GitHub连接插件

2) i downloaded facebook connect plugin for phonegap version 1.4.1 from GitHub

3)资产www文件夹我有这个文件

3) in assets www folder i have this files

资产 - > WWW - >

assets->www->


  • facebook_js_sdk.js

  • facebook_js_sdk.js

PG-插件-FB-connect.js

pg-plugin-fb-connect.js

PhoneGap的-1.4.1.js

phonegap-1.4.1.js

index.html的

index.html

4)我已经把ConnectPlugin.java在我src文件夹下的包名称的com.phonegap.facebook

4) i have put ConnectPlugin.java in my src folder under package name "com.phonegap.facebook"

5)我已经把这个<插件名称=com.phonegap.facebook.ConnectVALUE =com.phonegap.facebook.ConnectPlugin/> 这下水库> XML-> plugin.xml文件

5) i have put this <plugin name="com.phonegap.facebook.Connect" value="com.phonegap.facebook.ConnectPlugin"/> this under res->xml->plugin.xml file

6)libs文件夹下,我有这样的三个文件

6) under the libs folder i have this three files


  • facebook_js_sdk.js

  • facebook_js_sdk.js

Facebook的JS-补丁(我直接从GitHub项目复制这个补丁文件)

facebook-js-patch(i have copied this patch files directly from GitHub project)

phonegap.jar

phonegap.jar

7),最后在我的清单文件我已经给这个&LT;元数据机器人:名字=APP_ID机器人:值=APP_SECRET/&GT;

7) and finally in my manifest file i have given this <meta-data android:name="APP_ID" android:value="APP_SECRET" />

所以,我已经按照上述所有受此提步骤,当我点击登录按钮,Facebook的登录对话框弹出,但是当我givining的用户名密码,除登录我收到此错误所有的时间,如下面的图像

so,i have followed all above mention steps by this when i am clicking on login button facebook login dialog popup but when i am givining user name password and than login i am getting this error all the time as shown in below image

当我重试按钮,点击页面重定向到Facebook的主页上直接就地想回到我的应用程序....

and when i click on retry button page is redirected to facebook home page directly inplace of going back to my application....

另一个问题是,点击Me按钮也不起作用它显示了这样的错误。

another issue is that clicking on Me Button also doesn't work it shows such error

我被困在这个issue..is是因为Facebook插件或我错了一些地方?

i am stuck on this issue..is it because of facebook plugin or i am going wrong some where?

如果任何一个以前面对比指导我就可以了
由于提前

if any one have faced it before than guide me on it Thanks in Advance

修改

我解决我就登录状态的问题...我没有初始化我APP_ID在HTML文件...
另一件事需要记住的是,我们并不需要给&LT;元数据机器人:名字=APP_ID机器人:值=APP_SECRET/&GT; 中清单文件...

i solved my issue regarding login status...i did not initialize my app_id in html file... another thing need to remember is that we don't need to give <meta-data android:name="APP_ID" android:value="APP_SECRET" /> in manifest file...

仍然有,当我点击我的一个查询按钮,它表明了我的错误,如u可以看到上面的警报味精......如何解决?

still having one query when i am clicking on me button it shows me error as u can see in above alert msg... how to fix that?

修改(所有查询解决)

我也功能现在工作正常
ConnectPlugin.java 类,我改变功能的 GETRESPONSE()以这个低于一提code

me function also works fine now from ConnectPlugin.java class i changed function getResponse() to this below mention code

public JSONObject getResponse() {
String response = "{" + "\"status\": \""
        + (facebook.isSessionValid() ? "connected" : "unknown") + "\","
        +
        // "\"session\": {" + "\"access_token\": \""
        // + facebook.getAccessToken() + "\"," + "\"expires\": \""
        // + facebook.getAccessExpires() + "\","
        // + "\"session_key\": true," + "\"sig\": \"...\","
        // + "\"uid\": \"" + this.userId + "\"" +

        "\"authResponse\": {" +

        "\"accessToken\": \"" + facebook.getAccessToken() + "\"," +

        "\"expiresIn\": \"" + facebook.getAccessExpires() + "\"," +

        "\"session_key\": true," +

        "\"sig\": \"...\"," +

        "\"userId\": \"" + this.userId + "\"" +

        "}" + "}";

try {
    return new JSONObject(response);
} catch (JSONException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
return new JSONObject();

}

现在我能够获取也是好友列表
有关此更多的Infor U可以检查这个.... <一href=\"http://stackoverflow.com/questions/10026875/fb-api-me-always-giving-error-$c$c2500-in-phonegap-android\">FB.api('/me')总是给错误code:2500的PhoneGap的Andr​​oid

now i am able to fetch friend list also For more infor regarding this u can check this ....FB.api('/me') always giving error code:2500 in phonegap android

感谢每一位

推荐答案

解决的问题。我没有初始化我在HTML文件APP_ID ...
另一件事需要记住的是,我们并不需要给&LT;元数据机器人:名字=APP_ID机器人:值=APP_SECRET/&GT; 中清单文件...

Issue resolved. I did not initialize my app_id in html file... another thing need to remember is that we don't need to give <meta-data android:name="APP_ID" android:value="APP_SECRET" /> in manifest file...

我希望它能帮助

这篇关于发生一个错误,请稍后重试(实的PhoneGap插件,Android版)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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