facebook-android-sdk

android share audio file from assets folder

穿精又带淫゛_ 提交于 2020-01-15 10:43:26
问题 I can't share audio file from assets. Each app says that it can't send the file. Method for converting inputstream to temporary file public File getFile(String Prefix, String Suffix) throws IOException { File tempFile = File.createTempFile(Prefix, Suffix); AssetFileDescriptor tempafd = FXActivity.getInstance().getAssets().openFd(filepath); tempFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tempFile); IOUtils.copy(tempafd.createInputStream(), out); return tempFile; } Sharing

android share audio file from assets folder

本秂侑毒 提交于 2020-01-15 10:43:18
问题 I can't share audio file from assets. Each app says that it can't send the file. Method for converting inputstream to temporary file public File getFile(String Prefix, String Suffix) throws IOException { File tempFile = File.createTempFile(Prefix, Suffix); AssetFileDescriptor tempafd = FXActivity.getInstance().getAssets().openFd(filepath); tempFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tempFile); IOUtils.copy(tempafd.createInputStream(), out); return tempFile; } Sharing

android share audio file from assets folder

大兔子大兔子 提交于 2020-01-15 10:43:00
问题 I can't share audio file from assets. Each app says that it can't send the file. Method for converting inputstream to temporary file public File getFile(String Prefix, String Suffix) throws IOException { File tempFile = File.createTempFile(Prefix, Suffix); AssetFileDescriptor tempafd = FXActivity.getInstance().getAssets().openFd(filepath); tempFile.deleteOnExit(); FileOutputStream out = new FileOutputStream(tempFile); IOUtils.copy(tempafd.createInputStream(), out); return tempFile; } Sharing

App crash when requesting friend list

烂漫一生 提交于 2020-01-14 13:14:38
问题 I got a really strange crash. User login into the app correctly. I'm correctly calling all UiLifecycleHelper methods into my code. When I try to perfrom a simple request (get the user's friends list) my app crash in a brutal way. Here the function that make the app crash: private void fetchUserFriends() { //Gather all friend list Session session = Session.getActiveSession(); if( session != null && session.isOpened() ) { Request.newMyFriendsRequest(Session.getActiveSession(), new Request

App crash when requesting friend list

喜欢而已 提交于 2020-01-14 13:13:08
问题 I got a really strange crash. User login into the app correctly. I'm correctly calling all UiLifecycleHelper methods into my code. When I try to perfrom a simple request (get the user's friends list) my app crash in a brutal way. Here the function that make the app crash: private void fetchUserFriends() { //Gather all friend list Session session = Session.getActiveSession(); if( session != null && session.isOpened() ) { Request.newMyFriendsRequest(Session.getActiveSession(), new Request

How to get the profile picture from ProfilePictureView to store in the database

我怕爱的太早我们不能终老 提交于 2020-01-14 05:05:31
问题 I have successfully integrated facebook login in my android app.So I am displaying user profile data like name,email and picture. Now I need to store user data such as name,email and profile picture in database. I know how to get the name and email since it can be get from TextViews. But I am struggling to get the profile picture. The profile picture is displayed using ProfilePictureView. I tried to convert that image on ProfilePictureView to byte array, but it is not working.(Normally this

How to get the profile picture from ProfilePictureView to store in the database

徘徊边缘 提交于 2020-01-14 05:03:07
问题 I have successfully integrated facebook login in my android app.So I am displaying user profile data like name,email and picture. Now I need to store user data such as name,email and profile picture in database. I know how to get the name and email since it can be get from TextViews. But I am struggling to get the profile picture. The profile picture is displayed using ProfilePictureView. I tried to convert that image on ProfilePictureView to byte array, but it is not working.(Normally this

data always null in onactivityresult facebook android sdk 3.0

旧街凉风 提交于 2020-01-14 03:35:31
问题 I am stuck with this error for last 8 hours after a lot of debugging I have found that data returned via Intent is null inside my onActivityResult method. This is the code that I use to login. signInWithFacebook(); method is called via button in my activity, Session mCurrentSession; SessionTracker mSessionTracker; private void signInWithFacebook() { mSessionTracker = new SessionTracker(getBaseContext(), new StatusCallback() { @Override public void call(Session session, SessionState state,

java.lang.RuntimeException: Failure delivering result ResultInfo while logging using Facebook

流过昼夜 提交于 2020-01-12 19:08:15
问题 My application is working fine on emulator. So I decided to run my application on my Android phone. I am trying to login to Facebook account using my application and it works fine on emulator. And as soon as I run my application on android phone I always get this exception- 01-30 11:06:08.400: E/AndroidRuntime(7463): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64206, result=0, data=null} to activity {com.facebook.samples.sessionlogin/com.facebook

How to upload videos to Facebook using Facebook Android SDK 4.x?

假装没事ソ 提交于 2020-01-12 08:47:15
问题 I am trying to change my Facebook SDK from 3.20 to 4.x. The video upload gets broken with the new SDK. Here is the code that is working in 3.20: Request request = Request.newUploadVideoRequest(session, new File(videoPath), callback); Bundle params = request.getParameters(); params.putString("title", albumName); params.putString("description", " #SomeTag"); request.setParameters(params); request.executeAsync(); Here are the different things I have tried with the new SDK 4.x. But every time I