android - Facebook Login on PhoneGap, nothing happens -
what want achieve
i trying run sample app included in phonegap facebook plugin in android.
problem
upon clicking on "login", dialog asks permission (screenshot), after clicking ok goes main screen , nothing happens.
what have tried
i've installed facebook apk in phone, , facebook sdk android in eclipse, , linked sdk sample app. generated key hash, using keystore use export app, , added app's config on facebook.
i added com.facebook.loginactivity manifest this:
<manifest> ... <application android:icon="@drawable/icon" android:label="@string/app_name" android:hardwareaccelerated="true" android:debuggable="true"> <activity android:name="testafb" android:label="@string/app_name" android:theme="@android:style/theme.black.notitlebar" android:configchanges="orientation|keyboardhidden|keyboard|screensize|locale"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="com.facebook.loginactivity" android:label="@string/app_name" /> </application> </manifest> and added plugin this, in res/xml/config.xml:
<cordova> <plugins> ... <plugin name="org.apache.cordova.facebook.connect" value="org.apache.cordova.facebook.connectplugin" /> </plugins> </cordova> i modified index.html use version of cordova i'm using (2.6.0) , put appid in js:
document.addeventlistener('deviceready', function() { fb.init({ appid: '361413583977115', nativeinterface: cdv.fb, usecacheddialogs: false }); fb.getloginstatus(handlestatuschange); authuser(); updateauthelements(); }); i have no idea did wrong.
however, found out if grant permission app using computer, , try use app, works.
Comments
Post a Comment