当我在我的应用程序中测试集成时,它将完全适用于samsung和xiomi设备,但在其他设备中它会给出以下错误,因此这个api级别问题或任何其他错误如下:
这是我的代码:
if (!facebook.isSessionValid()) {
facebook.authorize(this,
new String[] { "email", "publish_stream" },
new DialogListener() {
@Override
public void onCancel() {
// Function to handle cancel event
}
@Override
public void onComplete(Bundle values) {
// Function to handle complete event
// Edit Preferences and update facebook acess_token
SharedPreferences.Editor editor = mPrefs.edit();
editor.putString("access_token",
facebook.getAccessToken());
editor.putLong("access_expires",
facebook.getAccessExpires());
editor.commit();
@Override
public void onError(DialogError error) {
// Function to handle error
}
@Override
public void onFacebookError(FacebookError fberror) {
// Function to handle Facebook errors
}
});
}
}
04-24 10:25:41.822:W / com.facebook.Session(26010):不应将读取权限(电子邮件)传递给发布或管理授权请求 04-24 10:25:41.822:I / Timeline(26010):时间轴:Activity_launch_request id:com.facebook.katana time:6217066 04-24 10:25:41.862:D / Facebook-Util(26010):获取网址:https://graph.facebook.com/me?format=json 04-24 10:25:42.482:D / Profile(26010):{“error”:{“message”:“必须使用活动访问令牌来查询有关当前用户的信息。”,“type”:“OAuthException ”, “代码”:2500}} 04-24 10:25:42.482:W / System.err(26010):org.json.JSONException:名称没有值 04-24 10:25:42.482:W / System.err(26010):at org.json.JSONObject.get(JSONObject.java:355) 04-24 10:25:42.482:W / System.err(26010):at org.json.JSONObject.getString(JSONObject.java:515) 04-24 10:25:42.482:W / System.err(26010):at com.h3ck.choicemobileno.welcome $ 5.onComplete(welcome.java:217) 04-24 10:25:42.482:W / System.err(26010):at com.facebook.android.AsyncFacebookRunner $ 2.run(AsyncFacebookRunner.java:276)
如果PLZ任何解决方案,那么PLZ发布它将是欣赏....