6

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.

4

1 に答える 1

10

facebook SDK に必要なのは appid だけです。Facebook サイトに登録するキーストアは、キー/シークレットが通常行うすべての認証を処理します。

于 2011-06-15T04:00:46.857 に答える