facebook-android-sdk

How to avoid showing already-authorized to app dialog in Android Facebook SDK

谁说我不能喝 提交于 2019-11-30 13:08:42
问题 I'm getting a completely useless page when I use the Single Sign on for Facebook's Android SDK. "You have already authorized app. Press "Okay" to continue. This page would destroy user experience. How can I remove this screen? Thanks in advance. Note: we won't see this issue If the FB app is installed in device. It will be raised only if the FB app is not available in device. 回答1: I am using the latest Facebook SDK 3.6 I believe and have tested so far on HTC One & Galaxy s3 mini . This page

How to get facebook profile picture of user in facebook SDK 3.0 Android

吃可爱长大的小学妹 提交于 2019-11-30 11:35:51
问题 i am using facebook SDK 3.0 i have to get profile picture of user login. Here is the code I use: URL image_value = new URL("http://graph.facebook.com/"+id+"/picture" ); profPict=BitmapFactory.decodeStream(image_value.openConnection().getInputStream()); But I don't get the desired result. 回答1: You should change your code following: URL image_value = new URL("http://graph.facebook.com/"+id+"/picture" ); Possible GET parameters for the URL can be found here: https://developers.facebook.com/docs

Android Facebook SDK 3.0 auth

自作多情 提交于 2019-11-30 09:38:34
I'm actually following SessionLoginFragment.java example from facebook sdk samples. What I really don't understand is this: when I make session.openForRead(new Session.OpenRequest(fragment).setCallback(statusCallback)); to log my user to facebook and ask basic read permission (just to test the integration) it simply does not work. I digged a bit with the debugger and I followed the path. If you don't put a requestCode to the OpenRequest of the session it will give it a random one (and this is ok). openForRead (my actual session is in CREATED status) will create the permission dialog. When you

How to get facebook user access token in android?

风格不统一 提交于 2019-11-30 08:57:52
I am using restfb API to access my friend's photos in Java. And to access these photos, I generate access code manually using Graph API explorer and pass this as a parameter to the restfb API call. But now I want to generate this access token through code (programmatically). I have seen fb android samples, particularly hackbook. I don't see any access code being generated which I can use for my own application. Do I need to create a new app and get some secret etc? Any suggestion will be appreciated. I have seen these solutions ( solution-1 & solution-2 ) on stackoverflow but I am still not

facebook android sdk -user email returns null

橙三吉。 提交于 2019-11-30 07:44:10
I am having the following code that signin the user to facebook through my app. I am getting user.getproperty("email") as null first time. when i run the app second time i am getting the value. below is my code. private void loginToFb() { final Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest( LandingPageActivity.this, Arrays.asList( "user_location", "user_birthday", "user_likes", "email")); Session.openActiveSession(this, true, new Session.StatusCallback() { // callback when session changes state @Override public void call(Session session, SessionState

Open a facebook page from android app?

与世无争的帅哥 提交于 2019-11-30 07:36:04
How can I start an intent to open a Facebook application on a phone and navigate to the prefered page in Facebook? I tried: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setClassName("com.facebook.katana", "com.facebook.katana.ProfileTabHostActivity"); intent.putExtra("extra_user_id", "123456789l"); this.startActivity(intent); Well, whatever I write to "1234567891", it is always navigating to my page. Always to me and not else. How could I do this? I had the exactly same problem, sent the user id but for some reason, my profile always opened instead of the friend's profile. The

How can i add facebook SDK to android project?

允我心安 提交于 2019-11-30 07:11:00
问题 I'm trying to add facebook SDK to android project but I'm unable to add it, I couldn't do it. My project has one package and there are 8-10 packages in it so where can I add facebook SDK? I searched a lot on the web but couldn't find good solution. 回答1: Following are the steps to include Facebook SDK into android project: 1) Download the Facebook SDK from the https://github.com/facebook/facebook-android-sdk/ and extract it to local drive. 2) Import "facebook" as a android project into your

Error inflating class com.facebook.widget.LoginButton

≯℡__Kan透↙ 提交于 2019-11-30 06:55:51
问题 I have built a Facebook integration using the steps from the 3.0 documentation. It works fine in when I deploy the app to my phone using Eclispe; however, when I export the app to upload it to the store and side load the apk, it fails with the following error. The SDK is there and loaded, when I export it. Any clue on where I am going wrong? 03-18 21:01:02.089: E/AndroidRuntime(14834): FATAL EXCEPTION: main 03-18 21:01:02.089: E/AndroidRuntime(14834): java.lang.RuntimeException: Unable to

How to create a Facebook key hash?

假如想象 提交于 2019-11-30 06:41:30
问题 In the Facebook android tutorial we are told to use following code to create a key hash: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Is this the exact code to use in all situations? For example instead of ~/.android/debug.keystore should it something like C:/folderone/foldertwo/.android/debug.keystore ? As you can see I'm unsure of whether inverted commas are required or not, whether full paths are required or not! Is

Could not find Facebook SDK.apk

微笑、不失礼 提交于 2019-11-30 06:13:43
Hey I know this was asked before, but none of the solutions seem to help. This is NOT a duplicate I have used the Facebook SDK before on an earlier project, now I started a new one and I get this weird error. I have set a reference to the library I have set the Facebook SDK project as a library I have tried deleting it and re-adding it according to the official documentation , and basically tried everything in this question . Though I still get this error and can't find out why. Worth to mention, when I tried to use the facebook class, it gave me an error with an option of "fix project", which