adding reference to facebook sdk in android - android

I am making an android app in which i am using facebook login.
I am unable to add the facebook sdk as library to my project.
can anyone tell what could be the problem.
thanks

You got facebook sdk from https://github.com/facebook/facebook-android-sdk Link.
Import this project in your eclips.
then go to package explorer of your eclipse and right click your original project --> property --> android . at this place below built target there is library option add your facebook project from here.
It may help you.

Did you solve your problem? If not here is what I did. In Eclipse right click in your app folder select Build Path -> Link Source and finally find the facebook-sdk folder click Finish and you are done.

Related

Importing facebook sdk for android in mac

I want to import Facebook sdk for android into my project and would like to use properties like Facebook:preset_size. I would also like to run the samples. I am doing this in mac.
All the examples that I have seen are for windows. Facebook sdk doesn't download as a zip in mac. Also when i try to set the source directory of the module as the folder that is downloaded or the Facebook folder inside it, I get an error that says "Specify location of the gradle or Android Eclipse project".
I have already compiled Facebook sdk using gradle and have successfully implemented Facebook login. But I want to run the samples and see the code.
Can anyone help me in doing this in mac?
I found a workaround for not being able to use the preset_size attribute in xml.
I am doing it through code now -
profilePictureView.setPresetSize(ProfilePictureView.LARGE);
As for running the samples,
I downloaded the github repository facebook-sdk-master and then imported it into my project. Then I changed the application name of the samples and set their app_id to my app_id. Now I am able to run them.

using eclipese project in android studio

I am trying to use an external eclipse project in android studio. I did n't find any nice tutorial.
"Also the docs says, If you want to import this project in Android studio, here you can download build.gradle."
Can you please guide me where/how to use this build.gradle?
Step by step procedure will be appreciated?
Open Android Studio.
Click 'File'.
Click 'Import Project'.
Choose the project to import.
It will ask for a destination to save the project as Android
Studio's.
Save it and it will automatically convert the project
Android Developers website has a quick migration guide.
General Android Studio information is available here.

Importing Facebook SDK into my android project

I know there are lots of questions and articles about how to integrate android facebook sdk into an existing project. I have tried some of the methods they have but with no success.
I have imported the facebook (sdk folder) into a new project and have the resulting src, res folders in a separate project. I am still not sure how to integrate that with my already existing project.
I know I cannot simply copy and paste the java files into my project because there will be errors linking resources and other .java files as the package names and destinations will change.
What is the simplest way to do this?
Thanks.
Import the FB SDK to your workspace. Then open the properties dialog of your project.
Click the add button at the bottom of the dialog. Choose the FB SDK you have imported. Click Apply and Ok.
Look that (Spanish blog, you can translate)
http://fpalero.tk/facebook-sdk-para-android/
If you dont understand say me and i translate for you and explain all steps.
But it's easy, when you import sdk facebook only delete libs/“android-support-v4.jar” on your project and changes by the libs folder of sdk facebook.
see the facebook developers site for complete detail and for download Facebook SDK for any platform
facebook sdk download and integration sdk to project and also interaction to messenger with intent
Right click on your project in project explorer window >> Properties >> Andoird >> In the dialog poped >> click on Add >> Select the FB library >> Click ok
Facebook sdk will be added to your project.

Could not find FacebookSDK

im just trying to intall facebook sdk to my phonegap android project.i followed
https://github.com/phonegap/phonegap-facebook-plugin
and after intalling fbsdk I have added it under Project
properties->Android->Library
section and select the facebooksdk library Im seeing green color tick mark infront of the added library. but when i opened Project again
properties->Android window
the green tick mark is not displaying under Library section,
instead I'm seeing red cross mark..i have added external jar files also but
cant find out the solutoin.is there any solutions for this ?
Following are the steps to include Facebook SDK into android project:
1) Download the Facebook SDK from the https://github.com/facebook/facebook-android-sdk/ and extract it to local drive.
2) Import "facebook" as a android project into your Eclipse, this is your Facebook SDK, and You have to reference it to your android project.
3) Now create your android project.
4) Right click on it, go to Properties-->android and Add the "facebook "Library as a reference to your project. click Apply.
Check the video link: http://www.youtube.com/watch?v=w-vNi1W4fco

FaceBook SDK Sample for Android

Today, I downloaded the Facebook SDK for Android and imported to the eclipse. When I tried the FB Sample app, it informed a error :
Project 'FB Sample App' is missing required Java project: 'Facebook SDK for Android - 5fec77c'
I don't know to fix it. Who can help me?
Thanks a lot!
You can just also import the library project Facebook SDK and mark it as library by going to properties of the imported project.
Then go to your example project and go to properties and add that library project.
Also Look to this Question
"For more details you can search "Android how to add project as library project" and you will find many step-by-step blog/tutorial"

Categories

Resources