I am using FBConnect on Android, it seems that the only ID I need is the app id, which is a string of digits:
Facebook mFacebook = new Facebook(FacebookConstants.APP_ID);
But I also got API Key and API Secret when register my app, I wonder where are these used? Did I do something wrong? I looked at the sample code from FBConnect, there is also nowhere using api key and api secret.
Edit: Can someone clarify that, are there three keys/IDs: app id, app key and app secret? Below are code from FBConnect's sample project: public static final String APP_ID = "175729095772478";
My app's application key does not look like this, mine has non-digits in it. And I'm still confused, in Facebook's Doc, there is a command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore
| openssl sha1 -binary
| openssl base64
it gives me a string which I can use to register on Facebook, but how does it relate to the application key and secret? I tried FBConnect's sample(the simple one) and I did not do the keytool command, it works; But if I use my app's application key, it does not work.
To obtain a new API Key and API Secret, log in to your SendSafely account and go to the Edit Profile page. From there you should see an API Access Keys section that allows you to manage your API Keys.
Now expand the Setting menu and select Basic. Here you can find the App ID and App Secret. Then click on the “Show” button in the “App Secret” text box. You can copy the “App Id” and “App Secret” which you can use for your Facebook API calls.
That is all you need for the facebook sdk just the appid. The keystore that you register on the facebook site handles all of the authentication that the key/secret normally would.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With