Unable to run sample Facebook App - android

I have been working on this all day. I have followed multiple tutorials including the one on facebooks developers site and the one on mybringback.com. I am just trying to get the sample application working.
So far it works on the emulator. it allows me to sign in. Granted i have not installed the facebook apk on the emulator. On my phone i just get 'An error has occured.' message. The stack trace only gives an error message when the app crashes upon exiting. Error is Unable to resume activity... caused by Failure delivering result ResultInfo.... its a null pointer exception when the application tried to resume from attempting facebook login.
I have my facebook app id in the hackbook sample application from facebook sdk.
I have generated a keyhash with the command that the facebook sdk instructs you to use.
I have also used this tool from easyfacebookandroidsdk to somehow get a second keyhash. I did not know which one would be the correct one so i put both of them in the dashboard.
I have updated the facebook application on my testing device.
I entered the package name and class name.
com.facebook.android
com.facebook.android.HackBook
Is there anything else that i need to do with the sample application besides replace the app_id?
Is there anything else that might affect my application from logging into facebook?
Just trying to get a new direction on this because i feel like i have exhausted my brain resources.

So..... I feel a little stupid but i cannot believe that i did not stumble on this info in my searches.
My application was not working because i had facebook already installed on my phone and i was logged in as a different user than i develop with. Once i logged out in the actual facebook application everything worked flawlessly.
Not an error in settings. Thanks for all your help Viewers there was actually not much to go on since everything was actually setup correctly.

Related

Android, Facebook Login only good for ONE login, then receives error?

I am using the new Facebook SDK (4.0.0). I am implementing a FB login, and it works fine for ONE login, but if you log out and then try to log in again, you get the following error:
This is all without closing the app, or modifying code or anything. Just log in, then out, then attempt to log in again.
The hash (blacked out) isn't even the same hash that my computer provides. There are similar threads talking about this problem, but no easy solutions, other than the remedy discussed below.
The only way I've found to remedy this problem is to delete the app from my Facebook Developers page, and create the app all over again, to get a new App ID. This is my first time using Facebook login, and so I am testing a couple things I'd like to happen when the user logs in. Is there any method to avoid this, so that I can log IN and OUT as many times as required?
Thank you in advance.

how to test Facebook Login for my mobile app

I am adding Facebook login to my app so to get permission to post photos for users. Having created the code, I now want to test that it works. So naturally I am using my own Facebook again to see that the system works. The first time I went through, I found some stuff I didn't like. So I made the changes. Now that I want to test again using my Facebook again, when I login, Facebook keeps telling me that I already gave the app permission. I tried uninstalling the app and then re-install, just in case it was caching locally. But that didn't help. So my question is: how do I get to reuse my account to login and request the permissions again? I hope the question is clear. If not, please ask for clarification.
I am experiencing this problem with android. But I am guessing it's similar for iOS, so I use both tags.
Open the following page in your browser: https://www.facebook.com/settings?tab=applications
Your App should be in that list, just remove it to test the authorization again.

invalid app id when logging into facebook from custom app

I used facebook sdk and created app in facebook couple of months back. Also, I was able to access and authenticate to the app.
But not sure what happened all of a sudden I am getting invalid App ID : app_id.
the only difference from last time to now is ... i created new emulator now.
so what are the check list to debug this issue.
I could see many threads asking the invalid app id but none of them ended with answer.
Check whether your app is still listed in your facebook developer account. Check the ID of the app in the facebook page with that you are having now.

Android Facebook SDK SSO "the page you requested cannot be displayed"

I've been stuck on this very frustrating problem all day and through Google I've found many people with the same problem with no answers that relate to the new Facebook API for Android. I have followed the steps listed here exactly :
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
When I run the sample app on my device I get this:
When I run it on the emulator it works. I understand this to be because of Facebook's SSO implementation. The emulator does not have facebook installed so it signs in for the first time successfully, but the device launches the facebook app and for some reason gives this error and when I travel back, it is as if I am not logged into facebook at all and there is no active session (though I am because when it launches the facebook app I can browse friends, etc.)
I cannot uninstall facebook on my device and even if I could that would be unacceptable for the app users. If possible, I'd like to retain the SSO feature, but somehow make it work!
I have spent all day going back and forth with my Hash Keys, and generated them through my device+code and with the keytool and they match so the problem is not related to that. Besides, the sample app runs on the emulator which surely means its an SSO problem. Thanks in advance.
After 8 hours of scanning through my code and the facebook docs, I simply decided to update my facebook app on my tablet ( I never use it and so never bothered to update it ) and now it all works.
I guess the Facebook app on my tablet was pre-SSO of Facebook on Android, but my created app was expecting it to be supported and giving the error.
Just to be a bit more clear, if you are either running on your device or on the simulator, make sure you have the latest Facebook APK installed. Facebook changed their permissions a while ago, and you may have to manually go to the Google Play store in order to download the updated version of Facebook (it may not auto-update for you given the permission changes).
Disabling Facebook did the trick for me. It forces the app to launch the browser and surf to Facebook that way

Android facebook sso - Invalid token

I am new to facebook sso, i have integrated the SSO into my application, this works fine in android emulator, at the same time when i do this application on device, am facing the error.. shows that invalid_token , but the same thing is working in emulator. i really don't know where the mistake is.
Even i have created the keystore and mapped with facebook apps and secret id...
Still the problem is not getting resolved...
please guide me to solve this particular issue.
Thanks in advance.
There are some problems with the SSO, the errors that are caused vary, but are probably all connected to the problem facebook is having.
It has been acknowldged by facebook as you can is in the Platform Status page.
It works in the emulator since you probably don't have the android facebook application installed on the emulator, because of that the SSO process is not the one which is used but the auth process that ships with the fb android sdk.
If the fb application is installed then the SSO kicks in and then that bug gets in the way.
There's no way to solve this for now (as far as I'm aware), the only thing is to "not using the SSO" even if it's available.
Other than that it's just waiting for facebook to solve the problem (though it has been like this for about a week or so already).

Categories

Resources