-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login to facebook on Android #5
Comments
are you loading the Facebook Android SDK* on your project? this is requirement, and that is what the error is describing... https://github.com/platanus/cordova-gigya#android |
Yes. I followed all instructions from ReadMe file and developers.facebook.com/docs/android/getting-started guide.
|
I also had some problems with the build after importing to eclipse. Try reverting the changes that the eclipse import did to your code, then I think what I did was, create a android.library.reference.1=CordovaLib
android.library.reference.2=<path_to_facebooksrc>/facebook-sdk |
I put facebook folder from full sdk into platform/android directory and created ant.properties file with content of
But I have login to facebook issue with errorMessage: "Login with Facebook is supported only using Facebook SDK native login." I have success builded application including jars from FacebookSDK. Attached my the build log:
|
you should have your FB_APP_ID in the should have something like this... <string name="facebook_app_id">483485723457</string> |
Yes, I have similar row in my string.xml and it writes in the file during of build/run. But it's not help with facebook login issue. |
After some experiments I got working Facebook login but with one issue: it doesn't work on the first try of my button click - I have "Login with Facebook is supported only using Facebook SDK native login" in my onError callback. On the second and others click is execute facebook login form. Other providers work regulary. After application restart the first execution is not working, only second.
|
well it makes sense. On the android gigya sdk, the initialize method doesn't have any callback, so I'm calling the cordova success handler right after calling the native initialize. Probably the If you want a quick test (not the definitive solution) you can try this in your click handler... cordova.plugins.CordovaGigya.initialize(apiKey);
setTimeout(function(){
cordova.plugins.CordovaGigya.login(
"twitter",
null,
function(user){
console.log(user);
},
function(error){
console.log(error)
})
}, 2000) |
I have very strange results of quick test: |
wierd... can you run |
It's a log when second click on facebook is working:
|
any idea why this line?
are you using the google plus provider? are you initializing on other place?? |
With google provider login works well. part of my view:
It's my click social network buttons handler:
When I separate initialize and do it once on the application start facebook provider login doesn't work independence from button click times. All another providers work always. |
I'm getting error while trying to install this Plugin. can you help here cordova plugin add https://github.com/platanus/cordova-gigya |
1 similar comment
I'm getting error while trying to install this Plugin. can you help here cordova plugin add https://github.com/platanus/cordova-gigya |
Using method from ReadMe (on Android platform):
Getting object:
Also I don't see Facebook in the list of providers when I'm using:
It is only twitter on the panel.
Other providers are working correctly for my login call.
The text was updated successfully, but these errors were encountered: