Questions tagged [facebook-android-sdk]

The Facebook SDK for Android helps Android app developer implement Facebook functionality into their Android apps. Features include Facebook Login, Friend and Place pickers, session management, native object responses from the Graph API and Feed and Requests dialogs.

The Facebook SDK for Android provides Facebook support within Android apps. You can utilize Facebook Native Login, invoke Sharing, Game Requests and App Invites dialogs, and read and write data using the Graph API.

The SDK is open source and is available on GitHub.
The current SDK major version is 4. See the Getting Started guide..

Facebook SDK for Android Documentation

1843 questions
219
votes
23 answers

Openssl is not recognized as an internal or external command

I wish to generate an application signature for my app which will later be integrated with Facebook. In one of Facebook's tutorials, I found this command: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1…
Khurram W. Malik
  • 2,660
  • 2
  • 20
  • 27
151
votes
9 answers

Android Facebook 4.0 SDK How to get Email, Date of Birth and gender of User

I am using the following code. I want the user's Date Of Birth, Email and Gender. Please help. How to retrieve those data? This is my onViewCreated() inside the Fragment. @Override public void onViewCreated(View view, Bundle savedInstanceState) { …
Sriyank Siddhartha
  • 1,832
  • 2
  • 12
  • 8
113
votes
6 answers

FacebookSdk.sdkInitialize (Context) is deprecated

I'm using facebook-android-sdk-4.19.0 in Android Studio and I followed the Facebook quick start guide at https://developers.facebook.com/docs/android/getting-started (Click on the Quick Start button to sign in with your own facebook account). In the…
Ozan
  • 1,381
  • 2
  • 10
  • 13
104
votes
12 answers

using facebook sdk in Android studio

I'm following Facebook SDK for Android using Android Studio. When I run my application I'm getting the below mentioned warning. Gradle: module 'facebook' won't be compiled. Unfortunately you can't have non-Gradle Java module and Android-Gradle…
101
votes
37 answers

Facebook key hash does not match any stored key hashes

I'm really having troubles with the Facebook hash key. I generated it in my Eclipse.. proof: Then I went to https://developers.facebook.com/ and registered a new app. And finally I've set my hashkey at the settings of Facebook developers: But no…
Yenthe
  • 2,313
  • 5
  • 26
  • 46
80
votes
9 answers

How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?

The title says it all. I'm using a custom button to fetch the user's facebook information (for "sign up" purposes). Yet, I don't want the app to remember the last registered user, neither the currently logged in person via the Facebook native app. I…
62
votes
1 answer

Facebook 3.0 Android second login attempt returns "Session state closed"

I'm trying to integrate Facebook into my Android app. Using the Facebook Login Button, I tried to login in. When I first install the app, it works fine and login successfully. When I logged out using that button, and then try to login again, it…
58
votes
6 answers

How to solve Facebook tools:replace="android:theme"?

I have compile 'com.facebook.android:facebook-android-sdk:4.16.0' My manifest:
NickUnuchek
  • 11,794
  • 12
  • 98
  • 138
56
votes
5 answers

Android Gradle build with sub projects

I am currently in the process of converting one of our projects to Gradle from maven. The folder structure is as follows: gitRoot settings.gradle build.gradle ProjectA build.gradle src/main/java Libraries …
Stoyan
  • 627
  • 1
  • 6
  • 8
52
votes
7 answers

Facebook authentication without login button

I have followed some Facebook API 3.0 tutorials, including the Login/Logout and the Publish To Feed examples. So the login works this way: App opens, shows a fragment which displays a login button User clicks login, the authentication is done via…
erdomester
  • 11,789
  • 32
  • 132
  • 234
51
votes
2 answers

Facebook SDK 3 EOFException

I am using the new FaceBook SDK 3.0. While posting images from the URL to "me/photos", I am intermittently getting an EOFException. I am getting this error once in a while (~1 in 20 times). I must also add that just after getting the EOFException…
Gaurav Vashisth
  • 7,547
  • 8
  • 35
  • 56
43
votes
6 answers

Android Facebook SDK 3.0 gives "remote_app_id does not match stored id" while logging in

I'm trying to build a app that uses Facebook SDK for Android 3.0. But when I'm trying to call Session.openActiveSession It just simply gives me a SessionState with CLOSED_LOGIN_FAILED, and LogCat is: 12-16 00:03:40.510:…
David Fang
  • 1,777
  • 1
  • 14
  • 19
41
votes
2 answers

Something similar to Cocoa Pods and Bundler for Android (for dependencies)?

is there anything similar to bundler (ruby) and cocoa pods (ios) for managing dependencies in Android?
meow
  • 27,476
  • 33
  • 116
  • 177
40
votes
11 answers

Unable to resolve dependency Android Studio 3.0

It's good to have a Updated Android Studio 3.0. But I am facing a problem with Android Studio 3.0, I just created a new project in Android Studio 3.0. Then I got some error I solved these by changing dependencies to latest version and issues…
UltimateDevil
  • 2,807
  • 2
  • 18
  • 31
39
votes
3 answers

Android - Facebook SDK 3 - How to login programmatically without LoginButton

I am writing an app that integrates with Facebook SDK, to share some (string) content as a wall post. Now, I made the HelloFacebookSample work. However It uses their LoginButton to log the user in. I don't want that. All I want to do is click my…
urSus
  • 12,492
  • 12
  • 69
  • 89
1
2 3
99 100