cordova - Facebook plugin does not work with phonegap build -
i having problems correctly setting facebook plugin phonegap build. have tried many things, couldn't fix problem.
my config.xml looks this:
<?xml version='1.0' encoding='utf-8'?> <widget id="com.bliphead.spottma" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"> <name>spottma</name> <description> hello world sample application responds deviceready event. </description> <author email="support@phonegap.com" href="http://phonegap.com"> bliphead </author> <plugin name="device" value="org.apache.cordova.device" /> <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.3.2"> <param name="app_id" value="myappid" /> <param name="app_name" value="bit_spotted_test" /> </gap:plugin> <plugin name="geolocation" value="cdvlocation" /> <gap:platform name="ios" /> <icon src="icon.png" /> <access origin="*" /> </widget>
i removed settings shorten code. i'm loading scripts in index.htm
<script src="phonegap.js"></script> <script src="cdv-plugin-fb-connect.js"></script> <script src="facebook_js_sdk.js"></script> // device ready fb.init({ appid: 'appid', // have replaced in working code. same config.xml. nativeinterface: cdv.fb, usecacheddialogs: false });
if want initialize facebook sdk fb.init
, error fb undefined.
maybe solution trivial, searched way long , didn't find working solution.
you attempting use plugin not support phonegap build 3.0. currently, plugin supports versions 2.5.0, 2.7.0, 2.9.0. can set version of phonegap build in config.xml using <preference name="phonegap-version" value="3.0.0" />
. not using tag @ all, assumes want latest version of phonegap build, 3.0.
Comments
Post a Comment