我正在使用我的phonegap / cordova app中的facebook集成。我正在关注链接
https://github.com/davejohnson/phonegap-plugin-facebook-connect/
我正在执行文章中提到的相同步骤,但是当我构建解决方案时,它会给出错误..
Could not parse contents of /Users/Burhan/Desktop/facebookExample/facebookExample/facebookExample-Info.plist':
The data couldn’t be read because it has been corrupted.
<key>FacebookAppID</key>
<string>[**APP_ID**]</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<string>com.facebook.phonegap.myscheme</string>
<array>
<string>fb362599863837976</string>
</array>
</dict>
</array>
我被困住了。亲切地帮助我。 提前致谢。 布尔汗
答案 0 :(得分:1)
Here是博客文章,可能对您有所帮助,这是将Facebook插件集成到手机屏幕应用程序的更简单解释的逐步过程。
答案 1 :(得分:1)
有关未来facebook与cordova / phonegap的整合,请参阅Official Facebook plugin
答案 2 :(得分:0)
function register_log_FB(){ openFB.init({ appId:&#39; 888864354512771&#39; });
if (app_userid == 'undefined' || app_userid == null || app_userid == "") {
console.log("No user_id so facebook login");
app_userid = "";
FBlogin();
} else {
console.log("user exit");
console.log("app_userid>>>>>>>" + app_userid);
first_nameFB = "";
last_nameFB = "";
social_idFB = "";
console.log(" >>>>>>>data>>>>lat " + rest_lat + " lng >>" + rest_lng
+ ">>fn " + first_nameFB + ">>ln " + restaurant_id + ">>rid "
+ last_nameFB + ">>tele " + telephone + ">>sid " + social_idFB
+ " >>img" + saveImg + ">>uid " + app_userid + ">>name "
+ re_name);
}
function FBlogin() {
openFB.login(function(response) {
if (response.status === 'connected') {
getInfo();
} else {
console.log('Facebook login failed: ' + response.error);
}
}, {
scope : 'email,read_stream'
});
}
function getInfo() {
openFB.api({
path : '/me',
success : function(data) {
first_nameFB = data.first_name;
last_nameFB = data.last_name;
social_idFB = data.id;
loadingMaybeSaved();
},
error : errorHandler
});
}
function errorHandler(error) {
console.log("Server error");
}
}