我最近从使用 BlackBerry Facebook SDK jar 切换到使用项目的源代码(从构建 jar 的标签中查看)。
自从这次切换以来,我遇到了 BrowserField
问题:
在设备上,加载图形将持续存在,直到我退出为止。
在模拟器上我看到:
Error requesting content for
https://www.facebook.com/dialog/oauth?scope=user_about_me,user_activities,user_birthday,user_education_history,user_events,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_photos,user_relationships,user_relationship_details,user_religion_politics,user_status,user_videos,user_website,user_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,user_checkins,friends_about_me,friends_activities,friends_birthday,friends_education_history,friends_events,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_online_presence,friends_photo_video_tags,friends_photos,friends_relationships,friends_relationship_details,friends_religion_politics,friends_status,friends_videos,friends_website,friends_work_history,manage_friendlists,friends_checkins,publish_stream,create_event,rsvp_event,offline_access,publish_checkins,manage_pages&redirect_uri=http://www.facebook.com/connect/login_success.html&display=wap&client_id=[APPLICATION_ID]&response_type=token
Error message null.
其中 APPLICATION_ID
是我正确的应用程序 ID。
上面的URL在我的PC浏览器中可以正常打开,我通过Facebook sdk的源代码调试了一段时间,没有发现任何结果。
应用程序 ID 最近可能在我不知情的情况下发生了更改,我的下一步是恢复使用 .jar 仅用于测试目的。
以前有人在 BlackBerry SDK 中见过类似的行为吗?
最佳答案
我不确定这是否是您的情况,但我在初始化 BrowserField 之前设置 ProtocolController 时看到了该错误。就像这样:
private BrowserField bf;
...
BrowserFieldConfig bfc = new BrowserFieldConfig();
// bf not initialized yet but no compiler error
bfc.setProperty(BrowserFieldConfig.CONTROLLER, new ProtocolController(bf){
public void handleNavigationRequest(BrowserFieldRequest request) throws Exception {
super.handleNavigationRequest(request);
}
public InputConnection handleResourceRequest(BrowserFieldRequest request) throws Exception {
return super.handleResourceRequest(request);
}
});
bf = new BrowserField(bfc);
add(bf);
bf.requestContent("http://www.google.com");
...
只需在 BrowserField 初始化之后但在请求内容之前设置 ProtocolController 即可解决该问题。
关于facebook-graph-api - 黑莓facebook SDK登录浏览器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9466155/