3

我正在我的 phonegap/cordova 应用程序中进行 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>

我被卡住了。请帮助我。提前致谢。布尔汉

4

3 回答 3

1

对于将来与 cordova/phonegap 的 facebook 集成,请参阅官方 Facebook 插件

于 2015-04-02T21:02:18.687 回答
1

是可能对您有帮助的博客文章,这是一个更简单解释的将 facebook 插件集成到 phonegap 应用程序的分步过程。

于 2013-01-24T05:07:52.090 回答
0

函数 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");
}

}

于 2016-05-06T05:48:53.473 回答