views:

970

answers:

4

Trying to connect to Facebook to make a statusupdate through my Android application. Got the whole thing running but I need API key + secret. Where can I create/get a hold of these?

private static final String apiKey = "<YOUR API KEY>";
private static final String apiSecret = "<YOUR SECRET KEY>";

Tried the same thing with Twitter and then I just "created" an application and recieved "ConsumerKEY" and "ConsumerSECRET", but what is the deal with Facebook?

+1  A: 

You'll need to create an application at http://www.facebook.com/developers/. This will give you an API key and secret specific to your app.

ceejayoz
But this looks like it's for a website and not a application running on Android phones? They as me to type in a website and then presents a file for me to download and upload to my website?
Sara
You don't need to use it on a website. The same key and secret can be used for a Facebook Connect website or an app. The wizards are set up for quick-start for people wanting to add a few things to their existing site. If you want to bypass the wizards, http://www.facebook.com/developers/createapp.php is available.
ceejayoz
Got it, and got it working :) Thanx!
Sara
+2  A: 

You have to log on to facebook (with any valid account), go to Account -> Application settings -> Developer -> Set up new application (button at the top right). After creating application you will see the key and secret at application settings page.

PanJanek
A: 

its not working in my case. I tried and added the api key and secret key as well. but when i try to connect to facebook a blank white dialogue appears only. kindly help me out.

regards, wahib

wahib
+1  A: 

Checkout this link. It's a simple guide on creating and finding your Facebook api key. http://www.shoutmeloud.com/how-to-acquire-your-facebook-api-key.html

Ray