Search code examples
androidfacebook-graph-apisdkfacebook-apps

How to install facebook api on emulator in windows 7?


I'm new for facebook app, so I need help to install the facebook api on android emulator in windows 7.

I have installed the facebook api but I got a library error..

[2013-04-02 16:22:35 - HelloFacebookSample] Unable to resolve target 'android-8'

in library

....\facebook ?


Solution

  • You don't install the Facebook API. Neither on a device nor on an emulator.

    You make calls to the Facebook API using their SDK for various platforms. In your case, the Facebook Android SDK. This Facebook Android SDK is to be integrated in your application that you develop.

    However, if you meant install the Facebook App on the emulator (the OP is mighty unclear), then you will need to grab the .apk file that is included in the SDK bundle that you can download from the link above. To install that APK, follow these steps:

    Make sure you have the emulator already running.

    1. Download the SDK package.
    2. Extract the contents of the zip to a folder.
    3. Find the APK file in the extracted folder, in the bin folder and rename it to a simple facebook.apk file name. Copy this file.
    4. Browse to your SDK location on your computer and navigate to the platform-tools folder. (We need the adb here). Paste the facebook.apk file here
    5. In an empty area in the folder, with the Shift key pressed, right click and select Open command Window here (make sure you are not doing this on any file or folder)
    6. Now, at the command prompt, type this command:

      adb install facebook.apk

    Following the above steps will install the Facebook application on your emulator.