android-facebook

java.lang.UnsupportedOperationException: Session: an attempt was made to request new permissions for a session that has a pending request

白昼怎懂夜的黑 提交于 2019-12-07 09:53:36
问题 Below code is for posting status update using facebookSDK3.0 in android. If I'm using UiLifeCycleHelper class its working well. But I want to post the status in facebook without using UiLifeCycleHelper class. I tried the below code, which throws error in my logcat and my application is forced closed. public class SampleFBPostActivity extends Activity implements OnClickListener { private EditText mPostEditText; private Button mDoneButton; private Session mSession; private PendingAction

Android Facebook Single Sign On error

自作多情 提交于 2019-12-06 16:16:48
问题 I am trying to implement Facebook SSO in my android app.It opens native Facebook app, after login process complete it shows "500: internal server error".What I am doing wrong? Any suggestion will be highly appreciated . Here is my code public class FacebookUtil { public static Facebook facebook = new Facebook(AppConstants.FACEBOOK_APP_ID); String FILENAME = "AndroidSSO_data"; private static SharedPreferences mPrefs; private static Context mContext; private static boolean isSucess; private

How do I publish a check in to facebook with android SDK

戏子无情 提交于 2019-12-06 11:06:14
问题 The docs are terrible. I want to publish a users check in to facebook. According to the docs creating a checkin object is deprecated https://developers.facebook.com/docs/reference/api/checkin and instead you're supposed to add a post with location data attached. So that's what I'm trying to do. Or maybe i'm supposed to try to publish and open graph story? Anyways here's what I have, it's basically the code to publish a post that is in their SDK sample, the post is created but there is no

Facebook Profile.getCurrentProfile() is always returns null after the first login

Deadly 提交于 2019-12-06 09:04:25
For the first time when I login into the app through Facebook, I'm getting profile from Profile.getCurrentProfile(); Where as when I exit the app and launch again, It was already logged in. So I can call directly Profile.getCurrentProfile(); is returning null. Code @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FacebookSdk.sdkInitialize(getApplicationContext()); setContentView(R.layout.activity_page); Profile profile = Profile.getCurrentProfile(); // For the first launch the profile will be null displayProfileName(profile); LoginButton

React-native fbsdk build errors

耗尽温柔 提交于 2019-12-06 05:16:40
问题 I am getting the following errors while running the command react-native run-android or ./gradlew build :react-native-fbsdk:generateReleaseResValues UP-TO-DATE :react-native-fbsdk:generateReleaseResources :react-native-fbsdk:mergeReleaseResources :react-native-fbsdk:processReleaseManifest :react-native-fbsdk:processReleaseResources /Users/a/projects/gratisapp/node_modules/react-native-fbsdk/android/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.3.1/res/values-v24/values

Android facebook 4.0.0 share dialog does not share the content

痴心易碎 提交于 2019-12-06 03:41:49
问题 For hours I have been trying to share a content in my android app by facebook 4.0.0 sdk. I exactly followed facebook share document but got no result. Share dialog open when I press share button but no content is in it. If I click ok it share an empty string just. Please show me a way to fix this. Edit BTW When I remove Facebook native app from my phone, I can share with webview of facebook. CallbackManager callbackManager; ShareDialog shareDialog; private View rootView; @Override public View

android connect facebook invalid keyhash

北战南征 提交于 2019-12-05 08:01:04
问题 i'm working android facebook sdk. i have problem when divice has installed facebook application(invalid key hash) i recived keyhash in this code public class SpleshScreen extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_splesh_screen); try { PackageInfo info = getPackageManager().getPackageInfo( "mypackage", PackageManager.GET_SIGNATURES); for

Using facebook login correctly

有些话、适合烂在心里 提交于 2019-12-05 02:56:57
问题 In my application on the start page I ask the user to authenticate via Facebook, then I request for some permissions and fetch some information: LoginButton authButton = (LoginButton) view.findViewById(R.id.authButton); authButton.setFragment(this); authButton.setReadPermissions(Arrays.asList("user_likes", "user_status")); fb = new FacebookMain(); I am able to get all this information, but moving to my next page I want to give a button on my listview and from there a user can post on a

How do I publish a check in to facebook with android SDK

橙三吉。 提交于 2019-12-04 16:44:15
The docs are terrible. I want to publish a users check in to facebook. According to the docs creating a checkin object is deprecated https://developers.facebook.com/docs/reference/api/checkin and instead you're supposed to add a post with location data attached. So that's what I'm trying to do. Or maybe i'm supposed to try to publish and open graph story? Anyways here's what I have, it's basically the code to publish a post that is in their SDK sample, the post is created but there is no location data attached. private void publishStory() { Session session = Session.getActiveSession(); if

Set Login/Logout Text for Button in Facebook Android SDK 4.0?

血红的双手。 提交于 2019-12-04 16:36:20
问题 My xml looks like this <com.facebook.login.widget.LoginButton xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/fb_login_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:paddingLeft="15dp" android:paddingRight="15dp" android:text="CONNECT WITH FACEBOOK" android:textColor="@color/white" android:textSize="20sp" android:textStyle="bold" android:background="@drawable/button_fb_login"/> and