facebook-android-sdk

Session.getActiveSession() returns null when starting the app, although I'm connected

↘锁芯ラ 提交于 2019-12-10 03:46:52
问题 I use com.facebook.widget.UserSettingsFragment to manage login/logout to Facebook in my app: UserSettingsFragment userSettingsFragment = new UserSettingsFragment(); Session session = Session.getActiveSession(); if(session==null || session.isClosed()){ userSettingsFragment.setPublishPermissions(Arrays.asList("publish_actions")); } fragmentTransaction.replace(R.id.content_container, userSettingsFragment, "userSettingsFragment"); In another Fragment (but same Activity ), Before publishing on

Facebook Android SDK, graph api >3.2 and 4.0 sending app request issue

元气小坏坏 提交于 2019-12-09 23:39:19
问题 I am trying to send app request to my facebook friend after authentication by using the following code snippet. public void sendApplicationRequest(final List<String> userIdList, final String message, final String title, final int requestCode) { final Bundle parameters = new Bundle(); parameters.putString("title", title); parameters.putString("message", message); parameters.putInt("requestCode", requestCode); parameters.putString("frictionless", "1"); String to = getListOfUsersAsString

How to give Facebook permission for accessing user data in facebook-sdk-3.0

坚强是说给别人听的谎言 提交于 2019-12-09 23:33:47
问题 I'm developing an application in which I'm using Facebook login for authentication and stuff. facebook sdk 3.0 needs some permission for accessing user data such as profile picture, emailID,publish_stram and etc. How to give permission in the code for accessing those things. Till now I'm able to get fb_access_token . Here is my code: Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(Session session,

android facebook login stops working if app is downloaded from google play

懵懂的女人 提交于 2019-12-09 18:45:38
问题 I uploaded my fully working app on Google Play and when download it from there, facebook login doesn't work!! I properly configure my facebook app and works with eclipse environment. After searching, it can be done due to facebook key hashes. However, I obtained it like: How to generate Key Hash for facebook SDK In Mac Seems that a key hash for distribution must be also obtained... but how? Thank you. 回答1: Alternative 1: Use this with the app signed with your release key . Not the one that is

Facebook Android SDK Session openForPublish not creating a new session

给你一囗甜甜゛ 提交于 2019-12-09 18:22:11
问题 In the Facebook Android SDK when I call Session tempSession = new Builder(this).build(); Session.setActiveSession(tempSession); tempSession.openForRead(new OpenRequest(this).setPermissions(FB_PERMISSIONS)); It gets a FB session and every thing runs as normal. But when I replace Read with Publish . i.e. follows Session tempSession = new Builder(this).build(); Session.setActiveSession(tempSession); tempSession.openForPublish(new OpenRequest(this).setPermissions(FB_PERMISSIONS)); It gives an

Facebook Login and Post To Wall works for first time only

夙愿已清 提交于 2019-12-09 13:56:07
问题 I have a strange situation.I am trying to integrate facebook with my app.But the login and post to wall works only for the first time.I am struck for the past 2 days and could not find a solution. Here is the code snippet: //.............Facebook.......................... private static final String APP_ID = "My app id"; // Instance of Facebook Class private Facebook facebook = new Facebook(APP_ID); private AsyncFacebookRunner mAsyncRunner; private SharedPreferences mPrefs; String access

Android facebook sdk does not call callback after login

痴心易碎 提交于 2019-12-09 07:34:57
问题 Help, I am trying to make a class that handles facebook login in my application. My problem is it doesnt work on all activity. On that activity it doesnt call the callback. After the login and authorize application webview is dismiss, the callback doesnt fire. the last state that printed in Logcat is OPENING Here is my code: public void doLogin() { if ((Session.getActiveSession() == null || !Session.getActiveSession().isOpened())) { List<String> permissions = new ArrayList<String>();

App crashes after first Facebook Login

久未见 提交于 2019-12-09 05:52:45
问题 Sometimes (not very frequently) my android app crashes after first logging to facebook using Facebook Login (Facebook SDK version 3.5). I'm getting exception: java.lang.RuntimeException: Unable to resume activity {my.app.package/com.facebook.LoginActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64206, result=0, data=null} to activity {my.app.package/com.facebook.LoginActivity}: java.lang.NullPointerException with 2 different root exceptions:

facebook Post on your behalf is not working in android facebook sdk 3.0.2

久未见 提交于 2019-12-09 00:41:14
问题 i am try to share the post in facebook. login, publish permission is working finefor the first time. if i delete the app from facebook web it is not asking me reinstalling login and "Post on your behalf" publish permission screen below is my code Please help what i made mistike. I tried lot but is not working properly.. Thank you for your kind advice and so i can improve lot in android. Below is my code... public class FacebokView extends Activity { static final String applicationId = String

facebook publish_stream versus offline_access on an android app

喜你入骨 提交于 2019-12-08 13:13:28
问题 I am making an android app that publishes facebook posts. I want it to publish posts anytime the user presses the "Send" button. According the the Facebook developer permissions page, the offline_access permission "Enables your app to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the