Facebook sdk get users phone number or Address?

This information is not available via the Facebook APIs and will not be added anytime soon. If you want this information from the user you should prompt them for it after they have logged into your application using Facebook. Here’s a link to Facebook’s APIs: https://developers.facebook.com/docs/reference/api/user/ You can use the graph API explorer to gain … Read more

Android Facebook api 3.0 error: Cannot call LoginActivity with a null calling package

I managed to find my problem. Although I wasn’t setting android:launchMode=”singleTask” my LoginActivity had android:noHistory=”true” which results in that exception. I put noHistory true because I didn’t want the user to be able to press back button on the first activity after login and go back to login screen. Now I need to find another … Read more

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

Update for latest SDK: Now @zeuter’s answer is correct for Facebook SDK v4.7+: LoginManager.getInstance().logOut(); Original answer: Please do not use SessionTracker. It is an internal (package private) class, and is not meant to be consumed as part of the public API. As such, its API may change at any time without any backwards compatibility guarantees. … Read more

Facebook authentication without login button

@erdomester, @sromku Facebook launch new sdk version 4.x where Session is deprecated, There new concept of login as from facebook LoginManager and AccessToken – These new classes perform Facebook Login So, Now you can access Facebook authentication without login button as layout.xml <Button android:id=”@+id/btn_fb_login” …/> MainActivity.java private CallbackManager mCallbackManager; @Override public void onCreate(Bundle savedInstanceState) { … Read more

When to request permissions with Facebook’s new Android SDK 3.0?

I was able to get it to work. It’s a modification of your Version 2 sample. The link Jesse provided also helped a ton. Here is the code I run through when authenticating a user: private void signInWithFacebook() { mSessionTracker = new SessionTracker(getBaseContext(), new StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) … Read more