facebook-android-sdk

Managing Facebook Session in Android App throughout multiple activities with Facebook SDK 3

给你一囗甜甜゛ 提交于 2019-12-01 07:45:47
问题 I have started using Facebook SDK 3.0. I am using LoginButton widget to login into the Facebook. I am referring Scrumptious sample for doing so. In this sample, one Activity(Where session is being initialized) is hosting multiple Fragments. But in my app, multiple activities hosting multiple fragments. First the launcher activity(Where session is being initialized) does the login operation with the LoginButton widget. How can i handle the session when I moved to other activities??? I found

“could not find com_facebook_android.apk error” when running Android project

筅森魡賤 提交于 2019-12-01 07:31:00
I've installed the Facebook API for Android in Eclipse, and imported the project into my Android project. My program builds perfectly fine, but when I try to run it I get Could not find com_facebook_android.apk! in the build window, and when the program actually tries to import any of the Facebook API classes it blows up with a java.lang.NoClassDefFoundError: com.facebook.android.Facebook Anatoly Lubarsky Check out referencing libraries instructions here: http://developer.android.com/guide/developing/projects/projects-eclipse.html Make sure you have the latest versions of ADT. Try to clean

Android Facebook SDK FacebookDialog.shareDialogBuilder doesn't show my description

痞子三分冷 提交于 2019-12-01 07:24:26
问题 I'm using the Facebook Android SDK to post a share from my Android app, setting the link to the Google Play url but I want to fill in my own description to be displayed. My description shows up in my preview when I'm posting from my app, but when it gets displayed all that shows is "GET IT ON GOOGLE PLAY" and my description has disappeared. I am modifying code taken from the Facebook share tutorial included in the SDK (currently using version 3.19.0), here is the ShareDialogBuilder code:

Android ClassNotFound and android.view.InflateException:

£可爱£侵袭症+ 提交于 2019-12-01 07:08:39
问题 I m trying to integrate the facebook in my app.I am using facebook example app downloaded from facebook as a reference(also generated the appId and all this process on developer.facebook).I am little lazy so I do not want to go through all the code of facebook sdk.In simple words i just add the com_android_facebook library project in my app, and also copy all the classes in facebook example app in my app except Example.java Now i modify the MyActivity class look like Example.java class, means

Session.openActiveSession only calls OPENING in Facebook Android SDK

≯℡__Kan透↙ 提交于 2019-12-01 06:55:35
I am trying to login with Facebook using the Facebook Android SDK, however, the status callback is fired only once with OPENING session state. After that, a Facebook login activity appears with no content (I know it's that activity as it has the title that I've set for title_facebook_login in strings.xml) for a brief moment and disappears within a second. No other callback is fired, no exceptions, no crashes. It just waits forever at my initial activity. Here is my code: Session.openActiveSession(parent, true, new Session.StatusCallback() { @Override public void call(Session session,

Facebook Android SDK v4.0.0 ShareDialog NullPointerException issue

耗尽温柔 提交于 2019-12-01 05:24:42
As per these instructions https://developers.facebook.com/docs/sharing/android I have implemented the Facebook ShareDialog to appear in my app but it's causing the following error. 03-27 16:12:53.150: E/AndroidRuntime(10275): FATAL EXCEPTION: main 03-27 16:12:53.150: E/AndroidRuntime(10275): Process: au.com.elegantmedia.emotit, PID: 10275 03-27 16:12:53.150: E/AndroidRuntime(10275): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference 03-27 16:12:53.150: E/AndroidRuntime(10275): at java.util.concurrent.ConcurrentHashMap

“could not find com_facebook_android.apk error” when running Android project

雨燕双飞 提交于 2019-12-01 04:47:13
问题 I've installed the Facebook API for Android in Eclipse, and imported the project into my Android project. My program builds perfectly fine, but when I try to run it I get Could not find com_facebook_android.apk! in the build window, and when the program actually tries to import any of the Facebook API classes it blows up with a java.lang.NoClassDefFoundError: com.facebook.android.Facebook 回答1: Check out referencing libraries instructions here: http://developer.android.com/guide/developing

Facebook Android SDK v4.0.0 ShareDialog NullPointerException issue

妖精的绣舞 提交于 2019-12-01 03:15:01
问题 As per these instructions https://developers.facebook.com/docs/sharing/android I have implemented the Facebook ShareDialog to appear in my app but it's causing the following error. 03-27 16:12:53.150: E/AndroidRuntime(10275): FATAL EXCEPTION: main 03-27 16:12:53.150: E/AndroidRuntime(10275): Process: au.com.elegantmedia.emotit, PID: 10275 03-27 16:12:53.150: E/AndroidRuntime(10275): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null

Using share dialog in Android Facebook SDK. How to know is user actually shared or cancelled sharing activity?

不羁的心 提交于 2019-12-01 03:09:21
I have added sharing functionality to Android app as described here https://developers.facebook.com/docs/android/share-dialog/#setup But I have noticed that if user is cancelled sharing activity onComplete is called anyway @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); uiHelper.onActivityResult(requestCode, resultCode, data, new FacebookDialog.Callback() { @Override public void onError(FacebookDialog.PendingCall pendingCall, Exception error, Bundle data) { Log.e("Activity", String.format("Error:

Posting an audio MP3 file through Feed Dialog using Facebook Android SDK

流过昼夜 提交于 2019-12-01 01:54:28
I have an Android app and I have implemented sharing through Facebook SDK for Android, I am using Feed Dialog Everything working as written, however, as the content is Audio, I now also want to share MP3 files, just like SoundCloud does. Feed Dialog accepts a "source" parameter, which seems to accept a SWF or MP3 source URL. Feed Dialog feature documentation is here. However, when I embed Source parameter, it do exactly as it says on tin "If both source and picture are specified, only source is used." However, it don't live up to first promise which is: "The URL of a media file (either SWF or