Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have tried to integrate FacebookSDK in eclipse, but its a really hectic process. The Eclipse all the time giving an error, I have watched the tutorials, and According to them and developers.facebook.com, all we need to do is clean and build the project in Eclipse. I have done that thousands of times, but same thing happens, either Exclamatory mark come with FacebookSDK or Some unusual errors. I have tried in 2 ways :

1) File -> Import -> Existing Project Into Workspace which gives the Imported Project name as FacebookSDK with exclamatory sign. (Project Properties -> Android -> Is Library checked and Java Compiler -> JDK compliance ->1.6) I have cleaned,built, but unusual error comes.

2) File -> New -> Android Project -> Create Project From Existing Source -> (Browse the SDK downloaded from developers.facebook.com) Now, this gives the project name as com_facebook_android

Can anyone tell me , proper way to integrate Facebook for Android ?

share|improve this question

4 Answers 4

Please try below link for complete example of Facebook integration in your android application with complete source code, it will solve your problem and if you have any query regarding that then tell me.

Android Facebook Integration

share|improve this answer
up vote 1 down vote accepted

The problem solved , i was using older Eclipse version, Downloaded New Eclipse(juno) http://www.eclipse.org/downloads/ And updated ADT to 21 and SDK.

Then followed the procedure from developers.facebook.com and Bingo !!

share|improve this answer

Have you set the Project Build Target for FacebookSDK? Under Properties->Android, after right-clicking on the FacebookSDK project.

share|improve this answer
your step 1) and 2) are correct but you have to do more step...i give u proper step:

Facebook Integeration

Go to github and download Facebook sdk
Extract to C drive. Import to eclipse, Select Facebook
Your App > Right click > Properties>Android>Library>Facebook
You need to get AppID  
                ------ To create facebook android native app you need to provide your Android application signature in facebook app settings. You can generate your application signature (keyhash) using keytool that comes with java. But to generate signature you need openssl installed on your pc. If you don’t have one download openssl and set it in your system environment path.

5. Download openssl
--------Open your command prompt (CMD) and run the following command to generate your keyhash.

keytool -exportcert -alias androiddebugkey -keystore "&lt;path-to-users-directory&gt;\.android\debug.keystore" | openssl sha1 -binary | openssl base64



...keytool -exportcert -alias androiddebugkey -keystore "C:\Users\deepika\.android\debug.keystore" | openssl sha1 -binary | openssl base64.............

After generating your app signature successfully, register your facebook application by going to create new facebook application and fill out all the information needed. And select Native Android App and give your hashkey there which you generated previously using keytool and note down your facebook App ID

6.Generate Access-Token

----To obtain an App Access Token, perform an HTTP GET on:
https://graph.facebook.com/oauth/access_token?
   client_id=YOUR_APP_ID
  &client_secret=YOUR_APP_SECRET
  &grant_type=client_credentials
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2014.7.30.1736\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Stack Overflow works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </nos"], "copyright__copyright__copyright": ["viously using keytool and note down your facebook App ID\n\n6.Generate Access-Token\n\n----To obtain an App Access Token, perform an HTTP GET on:\nhttps://graph.facebook.com/oauth/access_token?\n   client_id=YOUR_APP_ID\n  &client_secret=YOUR_APP_SECRET\n  &grant_type=client_credentials\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}