facebook-android-sdk

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

馋奶兔 提交于 2019-11-29 15:48:53
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) Added the following intent-filter to my app's main activity: <intent-filter> <action android:name=

New Facebook SDK and OAuthException in Graphpath requests

断了今生、忘了曾经 提交于 2019-11-29 15:44:49
问题 I saw a buch of answers regarding this problem with the older versions of the SDK, and I can't seem figure out why this is happening to me. if I use this code, it works perfectly: String QUERY = "select uid, name, pic_square, is_app_user from user where uid in (select uid2 from friend where uid1 = me())"; protected void getFacbookFirends() { Bundle params = new Bundle(); params.putString("q", QUERY); final Request req = new Request(getSession(), "/fql", params, HttpMethod.GET, fbCallback);

How to get facebook user access token in android?

杀马特。学长 韩版系。学妹 提交于 2019-11-29 13:09:18
问题 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

Facebook post to wall on Android, message only

那年仲夏 提交于 2019-11-29 13:05:16
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 but have read this is normal (also, I am getting a warning for 'message' but that still posts: Key

Getting email address by using Facebook SDK 3.0.1 for Android

夙愿已清 提交于 2019-11-29 12:53:38
I'm currently developing an application which aims to authenticate any user by using Facebook acoount. I have a trouble in getting user email from user's account. My code is below private void signInWithFacebook() { SessionTracker mSessionTracker = new SessionTracker(getBaseContext(), new StatusCallback() { public void call(Session session, SessionState state, Exception exception) { } }, null, false); String applicationId = Utility.getMetadataApplicationId(getBaseContext()); Session mCurrentSession = mSessionTracker.getSession(); if (mCurrentSession == null || mCurrentSession.getState()

Open a facebook page from android app?

送分小仙女□ 提交于 2019-11-29 10:22:13
问题 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? 回答1: I had the exactly same problem

Android Facebook SDK 4.0 Login without Facebook App

↘锁芯ラ 提交于 2019-11-29 09:18:24
I'm having issues with the webview login for Facebook on Android. I've followed the tutorials and login works perfectly when the user has the Facebook app installed. When the Facebook app is not installed, the webview for facebook login pops up; however, after logging in and accepting the permissions, the webview simply redirects back to the login screen. It never goes back to my app. Has anyone else encountered this problem? FacebookSdk.sdkInitialize(this); profileTracker = new ProfileTracker() { @Override protected void onCurrentProfileChanged(Profile profile, Profile profile2) { if

Import Facebook SDK for Android Studio 0.3.1

时间秒杀一切 提交于 2019-11-29 08:09:28
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 Edit next file and re-sync project (Sync project with gradle files button or restart idea). MyProject\MyApp\build.gradle repositories { mavenCentral() maven { url 'https://github.com/Goddchen/mvn-repo/raw/master/' } } dependencies { compile 'com.facebook.android

Facebook AccessToken.getAccessToken is null on opening of app even after first login

空扰寡人 提交于 2019-11-29 06:20:13
I have integrated latest Facebook android sdk (Sdk 4.0). This is the code I have added in my onCreate method. FacebookSdk.sdkInitialize(this.getApplicationContext()); callbackManager = CallbackManager.Factory.create(); if(AccessToken.getCurrentAccessToken()!=null){ Log.d(FBTAG,"facebook already logged in"); isFBLogin = true; } LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(LoginResult loginResult) { // App code Log.d(FBTAG,"facebook log in"); isFBLogin = true; } @Override public void onCancel() { // App code

Could not find Facebook SDK.apk

时光怂恿深爱的人放手 提交于 2019-11-29 06:02:29
问题 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