I got this error while adding the hash key to the facebook application, for SSO in my android application
error:
You have enabled a Mobile Web integration for your app, but have not specified Mobile Web URL.
what does this mean ? i never used android-facebook sdk before
while going through link: https://developers.facebook.com/docs/mobile/android/build/#register
i saw a box names Mobile Web Url:[?], what is this and what should be in there???
Check below image , your Application Settings should be like this :
Don't check anything other than this.
After doing this , generate Hash Key and put in respective field.
By mistakely you have checked website with facebook login checkbox.
uncheck it and it will work.
Related
At first I thought this was my app but I get the exact same problem when using any of the FB sample apps.
Take the HelloFacebookSample for example, which gives you a login button and after login shows you your pic and enables you to post status updates.
If I don't have the FB app installed on my phone the login button gives me a web view which i login through and the photo appears in the app and i can make posts. However if the FB app is installed on my phone it brings up a dialog saying the app would like to access you public profile etc. I press OK and..... nothing.
I have found many questions that seem similar but the problem was usually using a debug key as opposed to a release key, but I am running from eclipse so the debug key is still appropriate.
Any ideas?
if there is the default Facebook App is installed in your phone or if you are trying to upload your app on Google Play, then you need a different KeyHash. because, when u developed your FB app you have registered your FB app with a key hash which is created by using the default debug.keystore.
so, now u need a different KeyStore to generate the different KeyHash. u need a signed KeyStore, which u can get by the help of this tutorial , after generating new keystore, generate a key hash and register your FB App with this new key hash. this should work.
for generating new KeyHash u can follow this link
I found the next line that helped me in the above scenario:
mLoginFacebook.setReadPermissions(Arrays.asList("email"));
it comes right after:
mLoginFacebook = (LoginButton) rootView.findViewById(R.id.authButton);
mLoginFacebook.setFragment(this);
solved all my problems..
Cheers
I would try and follow this tutorial to see if you can get a sample app that you build yourself to connect with Facebook. I had issues connecting the sample apps with Facebook as well. I would also check that your app id from Facebook is in your manifest file.
https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/
I am using Parse.com API to connect my application to Facebook and share some data.
I have checked the Parse.initialize in my code, it has the correct keys. I have checked the ParseFacebookUtils.initialize in my code and it has the correct Facebook app Id. I have checked the settings on my parse account and facebook authentication is enabled and the facebook app id is set correctly.
No idea why I can not connect to facebook through Parse.
Btw, If I delete Facebook official app, the problem gets solved, but if it is installed on my device, I start getting this issue.
Am I missing something to check ?
Thanks!
I found the solution of my problem ...
It was related to the key hash registered on facebook.
To those guys who experience this problem, I recommend to check the key hash you get on your developing pc and check if this key hash is registered on facebook for your app.
In case you are new like me and have no idea how doing key hash related stuff, check this link :
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
I have gone through these links
Login failed invalid key error with Facebook SDK
and
http://sean.lyn.ch/2011/07/android-the-facebook-sdk-sso-and-you/
but i could not understand what hash key exactly is???
where is that used in my application??
and in the tutorials he says we need to add this key hash to the Facebook application...in my case i have a Facebook web application, is that enough or should i definitely create an application for mobile on Facebook???
The best place to start is the official tutorial.
This part is explain there in Step 5: Add your app's signature to the Facebook App Settings:
Facebook requires an additional layer of security for mobile apps in
the form of an application signature. You need to put your Android
application signature into your Facebook app settings.
Just follow their instructions, it's all pretty easy and straight forward.
I get this error when i click the login button of facebook in my android application
"Login Failed: invalid_key: Android Key mismatch. Your key "YLYMBqpjl/OenePeQNf4DORUfR8" does not match the allowed keys specified in your application settings, check your app settings at www.facebook.com/developers"
I have gone through link: http://sean.lyn.ch/2011/07/android-the-facebook-sdk-sso-and-you/
and many more, and found out that when using android-facebook sdk on a device (it works fine on emulator) if there is a facebook application already installed on that device it gives this error. to solve this generate a hash key and add it to the facebook application settings, which i did properly, but still i get the same error.
where does this key - "YLYMBqpjl/OenePeQNf4DORUfR8" come from in my error message??
it was working fine on emulator, i could login and post on my wall and get userID, email etc...but on device i get this error
Your key is : "YLYMBqpjl/OenePeQNf4DORUfR8"
paste this key in Native Android App Which Mark as a green Border.
#archie.bpgc it is because you are using the same key which tute uses to authenticate your app with facebook. if you have registered your app on facebook then you will find key for your application on homepage of your registered app.
check this image it shows on top app id
http://i48.tinypic.com/2nas9i0.png
I have created an Android application that uses Facebook SDK to make wall posts. It works fine on devices that don't have the native Facebook App installed, but when it is, it throws an Invalid Key error.
I have checked all the settings & keys from my facebook application and my device code twice and all is setup right. What do I need to do to resolve this issue?
You received this error because of wrong hash calculated on your app. During application execution calculated hash value is send to facebook. If value is different from value you set in facebook developer profile - problem. If you cannot calculate correctly - read it from error message and put it to facebook developer profile. I made the same.
This is the problem because of the hash key. You ca find out the hash key of your app from this link
Facebook Integration in Android Application
and can update it in facebook app.