Android App could not publish photos while the apk is released - android

I am developing an android app, with the function:publishing a photo to facebook via Facebook Share dialog. (My code is similar to facebook sdk's samples"HelloFacebookSample")
It works fine in debug mode. But if I generate the app as signed apk and test it again, it works well until I click the "Share". The result shows Upload failed on the Android Notification Bar.
What's wrong with my app? Is there anyway to check the message from facebook when apk is released? Thanks in advance.

When you generate a release APK, generally you're using a different signing key, which means there will be a different key hash. You should put that key hash into your FB app settings (under the Android section).

Related

Does the Facebook login app have to be the same for the android and website?

I am have created a app and website where I both have implemented Facebook login. My website login works fine but my app login does not. I'm not sure what the problem is. It worked fine with the debug version. This is what it shows me
What I have done so far:
I have one facebook app for both android and the website. (I had two separate ones before)
I added the release key hash to the facebook app. So I have two key hashes in my facebook app now, debug and release hash. I have tried replacing the debug key hash with the release one after I published it to the app store and just use that one, but that also didn't work. So I added both.
Please help!

I have used facebook login in app works on Andorid Emulator but not on actual Android device

What should I do, Facebook login works on Emulator but not on actual device
The final step of facebook login authentication states that,
Create a Development Key Hash
Facebook uses the key hash to authenticate interactions between your
app and the Facebook app. If you run apps that use Facebook Login, you
need to add your Android development key hash to your Facebook
developer profile.
For the version of your app that you release to you also need to
generate and set a Release Key Hash.
On either OS X or Windows you can get a key has by generating it or by
using the value returned by Settings.getApplicationSignature(Context).
For instructions, see Running Sample Apps .
It is because you haven't done this, you're getting this error!
Check this link
Please check mode as release or debug in facebook app development. apart from that need to generate and set a Release Key Hash.
very old question but I found how to resolve. Just use
LoginManager.getInstance().loginBehavior = LoginBehavior.WEB_ONLY
or
LoginManager.getInstance().loginBehavior = LoginBehavior.WEB_ONLY
and installed app will not bother you

facebook login issue with android sdk

I have created an app which needs to login with the facebook.
When i connect my device to my pc and run it from android studio then it is works fine.
i am able to connect with facebook sdk and able to login.
But when i create an .apk of my app and install it on my device and other devices then it is not able to login with that.
When i press login button then it goes to facebook page and return to my app screen.
i have done all settings on facebook developer account. my app is live and i have turn on single sign on
So what is the issue with that ? When i run it from studio then it works but when i create an apk and run then it is not working.!!!
When you run app from Android Studio it uses debug key hash to login in Facebook. Did you set Facebook release key hash like it show in their docs?https://developers.facebook.com/docs/android/getting-started#release-key-hash
Typically when you create an apk, you're using a different key to sign the app (whereas debug builds will use the debug key).
This means that you need to update the key hash in your Facebook app settings to also include the key hash of your release key.

Android Facebook sample app doesn't login when FB app installed

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/

How to debug Android App Connected to Facebook SDK?

I'm developing an app connected to native Facebook app.
I found that Facebook requires a hashkey of my App in order to connect it to the Facebook native app.
When I export my app using a keystore, there's no problem-I just have to register my hashkey on the facebook app setting console, and it works fine.
However, when I debug my app, Native Facebook App recognizes my app as unregistered. I think this because Eclipse applies different keystore(the default debug keystore) on my app when debugging.
So I made two versions of my Facebook app on the server side-the real one, and the one for my debug-keystore.
I want my app to call the former one when released, and the letter one when debugging.
Is there any way, in Android Java code, to check if the current app is running on the debug keystore?
You can register both two hash key of on the facebook app setting console.
More than one hash key can be setup on a facebook app

Categories

Resources