I could not write the question simply because stack overflow was not allowing me to.
where do we place the Facebook SDK while doing programming for android in eclipse.
Suggestions are appreciated.
I could not write the question simply because stack overflow was not allowing me to.
where do we place the Facebook SDK while doing programming for android in eclipse.
Suggestions are appreciated.
To import the SDK library project and the samples, with the new SDK, go to Eclipse's 'File' > 'Import' menu, and select 'General' / 'Existing Projects into Workspace'.
You can import these projects into a clean workspace all at once. In particular, make sure there is no existing facebook project in your workspace. If one exists, it is possibly referencing an older Facebook SDK. You should either delete it or change your workspace.
Browse to select the root of your SDK folder, facebook-android-sdk-3.16
. The SDK should appear in the list as 'FacebookSDK' along with all of the samples.
You must unselect the 'Copy projects into workspace' option so that each of the sample projects retains a correct reference to the neighbouring SDK. However, this means that Eclipse creates a link to the project in the SDK installation, rather than making a copy of it.
(This is useful if you expect to update the SDK in-place in the future and have your workspace's library project update accordingly. However, if you choose to edit the SDK samples in the future, you may wish to subsequently re-import them with a copy so as not to affect the original versions.)
Click 'Finish'. You are now ready to run the sample apps. You may need to provide your Android key hash to Facebook to run some of the samples. You can learn how to do this in the next step
If the sample projects are showing errors, simply use 'Project' > 'Clean' in Eclipse to refresh all the project's states.
It is also possible that your Eclipse compiler level has not matched that required by Android. If you see errors like "Android requires compiler compliance level 5.0 or 6.0.", simply make sure the project (or Eclipse) properties mandate v1.6 in the Java Compiler section: Finally, if you're having trouble getting Eclipse to import the SDK at all, try importing it as an Android project.
To do this, in the initial step when you go to Eclipse's 'File' > 'Import' menu, instead of selecting 'General' / 'Existing Projects into Workspace', expand the 'Android' section and choose 'Existing Android Code into Workspace'.
For more details look into https://developers.facebook.com/docs/android/getting-started