FaceBook integration in PhoneGap app
I am working on a facebook integration in a phonegap / cordova app. I am following the link
https://github.com/davejohnson/phonegap-plugin-facebook-connect/
I follow the same steps as mentioned in the article, but when I create a solution it gives an error.
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>
I am stuck. Help me. Thank you in advance. Burkhan
+3
source to share
3 answers
function register_log_FB () {openFB.init ({appId: '888864354512771'});
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");
}
}
0
source to share