facebook-android-sdk

New Facebook API 3.0. and ActionBarSherlock compatibility

拈花ヽ惹草 提交于 2019-12-31 19:54:13
问题 I'm reading facebook Android API 3.0 documents, and I do not understand what does session has to do with background activities. In all examples I'm supposed to extend "FacebookFragment". Well, that would be nice if my whole app is not extending "SherlockFragment" so I do not see extending FacebookFragment as an option. If I use the code from SessionLoginExample, and put my AppID in Strings in the very same string as facebook does I get the: Error 10-22 17:04:26.464: E/AndroidRuntime(5491):

Android Facebook-sdf Exception: Failed to generate preview for user

≯℡__Kan透↙ 提交于 2019-12-31 05:44:06
问题 i'm developing a simple android app and i want post a status in facebook using OpenGraphObject and OpenGraphAction. if i use new FacebookDialog.ShareDialogBuilder(this) i have no problem, but when i'm using FacebookDialog.OpenGraphActionDialogBuilder i got the error: 01-09 15:56:29.594 11439-11439/simov.project2.yourcity E/Activity﹕ Error: com.facebook.FacebookException: Failed to generate preview for user. java public void test(int position){ File f = (File)mImageAdapter.getItem(position);

Android Facebook SDK - Get user events

筅森魡賤 提交于 2019-12-31 02:14:27
问题 i've being able to login and get the user infos from the api with this code: Facebook facebook = new Facebook("XX"); AccessToken token = AccessToken.createFromExistingAccessToken("XX", new Date(facebook.getAccessExpires()), new Date(facebook.getLastAccessUpdate()), AccessTokenSource.FACEBOOK_APPLICATION_NATIVE, Arrays.asList(permissions)); Session.openActiveSessionWithAccessToken(getActivity(), token, callback); session = Session.getActiveSession(); Request.executeMeRequestAsync(session, new

Android Facebook SDK - Get user events

雨燕双飞 提交于 2019-12-31 02:13:05
问题 i've being able to login and get the user infos from the api with this code: Facebook facebook = new Facebook("XX"); AccessToken token = AccessToken.createFromExistingAccessToken("XX", new Date(facebook.getAccessExpires()), new Date(facebook.getLastAccessUpdate()), AccessTokenSource.FACEBOOK_APPLICATION_NATIVE, Arrays.asList(permissions)); Session.openActiveSessionWithAccessToken(getActivity(), token, callback); session = Session.getActiveSession(); Request.executeMeRequestAsync(session, new

Facebook android shareDialog closes after opening

人走茶凉 提交于 2019-12-30 05:55:09
问题 Following THIS I'm using facebook sdk in my android application and for test I've added below code to my MainActivity: CallbackManager callbackManager; ShareDialog shareDialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FacebookSdk.sdkInitialize(getApplicationContext()); setContentView(R.layout.activity_main); callbackManager = CallbackManager.Factory.create(); shareDialog = new ShareDialog(this); if (ShareDialog.canShow(ShareLinkContent

Facebook SDK for Android - set Application ID programmatically

北慕城南 提交于 2019-12-30 01:11:22
问题 I have a native Android app that needs to connect to a different Facebook app (different Application ID) based on an app setting that can be changed at runtime. Imagine the app can be set to point to DEV, TEST, or PROD. When pointed to DEV the FB Application ID should be "1". When pointed to TEST the FB Application ID should be "2". etc. The problem is the UiLifecycleHelper from the Facebook SDK automatically reads the "com.facebook.sdk.ApplicationId" from the AndroidManifest.xml during the

Facebook deep link opens Google Play instead of app (even when installed)

半城伤御伤魂 提交于 2019-12-29 08:50:49
问题 I'm trying to use Facebook's new Mobile App Engagement for android, but I can't figure out why entering the ad takes me to my App's install page at Google Play, instead of opening my own app so I can handle the intent... Here is what I've made so far: 1) At the "Native Android App" section (on App Basics Page), enabled "Deep Linking". The Key Hashes look ok, and Login with Facebook in my app works fine. 2) Created an engagement ad with Power Editor, and passed "myapp://type/id" as Deep Link 3

Facebook Activity not loading correctly in facebook-sdk 4.4.0

北战南征 提交于 2019-12-29 08:41:39
问题 I want to integrate Facebook signin in my android app. I am using Facebook-sdk-4.4.0. Using the LoginManager class method. But I am facing problem on running the following code- FacebookSdk.sdkInitialize(getApplicationContext()); callbackmanager = CallbackManager.Factory.create(); // Set permissions LoginManager.getInstance().logInWithReadPermissions((Activity)getContext(), Arrays.asList("email", "public_profile")); LoginManager.getInstance().registerCallback(callbackmanager, new

Facebook post to wall on Android, message only

你离开我真会死。 提交于 2019-12-29 08:25:53
问题 The below code only seems to POST the 'message' and nothing else. Is there something I am missing? (using the Facebook Android SDK) parameters.putString("link", link); parameters.putString("description", description); parameters.putString("caption", caption); parameters.putString("name", name); parameters.putString("message", msg); try { String response = mFacebook.request("me/feed", parameters, "POST"); } catch (IOException e) { Log.e("Error", e.toString()); } I am getting lots of warnings

Import Facebook SDK for Android Studio 0.3.1

删除回忆录丶 提交于 2019-12-29 07:14:08
问题 The Project Structure dialog in 0.3.1 has changed completely - I cannot figure out how to import the Facebook SDK using the new structure. Facebook's import instructions has not been updated. If anyone coul provide assistance please that would be much appreciated. Update: Screenshot of errors after applying @plastiv's suggestion 回答1: Edit next file and re-sync project (Sync project with gradle files button or restart idea). MyProject\MyApp\build.gradle repositories { mavenCentral() maven {