facebook-android-sdk

How to send friend request using Facebook dialogs on Android?

怎甘沉沦 提交于 2019-11-29 05:13:47
I want tot send a friend request using the Facebook Android SDK. I'm currently using this code (which I got from here ): Bundle parameters = new Bundle(); parameters.putString("APP_ID","USERNAME"); facebook.dialog(this, "friends", parameters, this); where APP_ID is the Facebook ID of my app and USERNAME is the username of the friend I want to add. This leads to the following error: API Error Code:100 Invalid parameter The parameter id is required I thought the id parameter meant the APP_ID. I have gone through the relevant documentation regarding dialogs at http://developers.facebook.com/docs

Android Facebook session issue

♀尐吖头ヾ 提交于 2019-11-29 04:33:27
I have used following code for Facebook authentication and it is working fine, but when I have cancelled the authentication and tried to authenticate again the app crashed and the log was Caused by: java.lang.UnsupportedOperationException: Session: an attempt was made to open an already opened session. On debug I got like this {Session state:CREATED, token:{AccessToken token:ACCESS_TOKEN_REMOVED permissions:[]}, appId:xxxxxxxxxxxxxxx} How can I solve this issue.Please help me.Thanks in advance private void askFacebbokAuthentication() { Session session = Session.getActiveSession(); if (session

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

元气小坏坏 提交于 2019-11-29 03:07:41
问题 I used facebook 3.6 sdk . i want to get profile picture from graph user , last time i got image but now it returns null Bitmap. I used following code private void onSessionStateChange(Session session, SessionState state, Exception exception) { if (session.isOpened()) { Request.newMeRequest(session, new Request.GraphUserCallback() { @Override public void onCompleted(GraphUser user, Response response) { if (user != null) { try { URL imgUrl = new URL("http://graph.facebook.com/" + user.getId() +

Get publish_action permission after getting read permissions from Facebook

☆樱花仙子☆ 提交于 2019-11-29 02:54:27
问题 I'm integrating Facebook log in in my application. I'm able to get the read permissions but how to get publish permissions from Facebook SDK. This is how I'm asking for the permissions for read: @Override public void onClick(View v) { Session currentSession = Session.getActiveSession(); if (currentSession == null || currentSession.getState().isClosed()) { Session session = new Session.Builder(context).build(); Session.setActiveSession(session); currentSession = session; } if (currentSession

android facebook publish photo

风格不统一 提交于 2019-11-29 01:59:27
问题 After looking on the net for 2 days I finally decided to post on SO. Well I simply want to publish a photo in my android app on to facebook. AM using the official android-facebook-sdk. I imported to example project and in the upload section add my code to upload photo. like mUploadButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { Bundle params = new Bundle(); params.putString("method", "photos.upload"); Bitmap temp = BitmapFactory.decodeResource(getResources(),R

facebook api version used in facebook android sdk

自闭症网瘾萝莉.ら 提交于 2019-11-29 01:47:57
I'm getting the following alerts on Facebook Developers: 'MyApp currently has access to Graph API v2.2 which will reach the end of its 2-year lifetime on 27 March, 2017. To ensure a smooth transition, please migrate all calls to Graph API v2.3 or higher.' and I'm using Facebook Android SDK 3.23.0. How can I know the version of Graph API used in such Facebook Android SDK? Thank you I had the same problem, and annoyingly, I couldn't find anything about this in documentation. You can, however, refer to these two links: https://developers.facebook.com/docs/android/upgrading-3.x https://developers

Unable to resolve dependency Android Studio 3.0

时光怂恿深爱的人放手 提交于 2019-11-28 18:11:33
It's good to have a Updated Android Studio 3.0 . But I am facing a problem with Android Studio 3.0 , I just created a new project in Android Studio 3.0 . Then I got some error I solved these by changing dependencies to latest version and issues solved. But, when I added a dependency of facebook account-kit sdk com.facebook.android:account-kit-sdk:4.+ I am getting following errors-: Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.facebook.android:account-kit-sdk:4.+. Open File Show Details build.gradle(app) apply plugin: 'com.android.application'

How to get Facebook photo, full name, gender using Facebook SDK android

試著忘記壹切 提交于 2019-11-28 17:16:50
I am working on an Android application in which any Android user who is logging to Facebook using our Application, I need to extract his photo, his gender, his full name from the Facebook. I am using Facebook SDK for this. With the help of Facebook SDK, I am able to login into Facebook but I am not sure how to extract his photo,gender and full name from the facebook? Below is the code I am using to login into Facebook. I followed this tutorial public class SessionLoginFragment extends Fragment { private static final String URL_PREFIX_FRIENDS = "https://graph.facebook.com/me/friends?access

FacebookSdk.sdkInitialize (Context) is deprecated

本秂侑毒 提交于 2019-11-28 16:55:48
I'm using facebook-android-sdk-4.19.0 in Android Studio and I followed the Facebook quick start guide at https://developers.facebook.com/docs/android/getting-started (Click on the Quick Start button to sign in with your own facebook account). In the guide, it's told to copy&paste the following code in the snippet to track app logs import com.facebook.FacebookSdk; import com.facebook.appevents.AppEventsLogger; public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); FacebookSdk.sdkInitialize(getApplicationContext()); AppEventsLogger.activateApp(this)

Is it possible to change Facebook login button image in Facebook Android SDK3?

喜夏-厌秋 提交于 2019-11-28 16:51:18
Facebook Android sdk has a com.facebook.widget.LoginButton I want to put my own image for the Login button. Is it possible ? So far i've tried adding android:src="@drawable/facebook" to the layout file as an attribute to the button element with no luck I ended up overriding the text to be empty string and then defining the setBackgroundResource of the button to my image (didn't need the dynamic login/logout text functionality) <com.facebook.widget.LoginButton xmlns:fb="http://schemas.android.com/apk/res-auto" android:id="@+id/login_button" android:layout_width="249dp" android:layout_height=