Refine search
Bundle param = new Bundle(); param.putString("message", "picture caption"); param.putByteArray("picture", ImageBytes); mAsyncRunner.request("me/photos", param, "POST", new SampleUploadListener());
@Override public Bundle getParameters() throws IOException { Bundle parameters = new Bundle(); parameters.putString(PARAM_UPLOAD_PHASE, PARAM_VALUE_UPLOAD_TRANSFER_PHASE); parameters.putString(PARAM_SESSION_ID, uploadContext.sessionId); parameters.putString(PARAM_START_OFFSET, chunkStart); byte[] chunk = getChunk(uploadContext, chunkStart, chunkEnd); if (chunk != null) { parameters.putByteArray(PARAM_VIDEO_FILE_CHUNK, chunk); } else { throw new FacebookException("Error reading video"); } return parameters; }
byte[] data = null; String dataPath = "/mnt/sdcard/KaraokeVideos/myvideo.3gp"; String dataMsg = "Your video description here."; Bundle param; facebook = new Facebook(FB_APP_ID); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); InputStream is = null; try { is = new FileInputStream(dataPath); data = readBytes(is); param = new Bundle(); param.putString("message", dataMsg); param.putString("filename", dataName); param.putByteArray("video", data); mAsyncRunner.request("me/videos", param, "POST", new fbRequestListener(), null); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
Bundle params = new Bundle(); params.putByteArray("message", "Test".getBytes()); params.putByteArray("name", "American Virgin".getBytes()); params.putByteArray("link", "http://bit.ly/12345".getBytes()); params.putByteArray("description", "A Freshman College Girl on a scholarship from an ...".getBytes()); params.putByteArray("picture", "http://xxx/MOV1026.jpg".getBytes()); mAsyncRunner.request("me/feed", params, "POST", new TestRequestListener());
byte[] data = null; Bitmap bi = BitmapFactory.decodeFile(photoToPost); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); params.putString("method", "photos.upload"); params.putByteArray("picture", data); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); mAsyncRunner.request(null, params, "POST", new SampleUploadListener(), null);
public Builder withByteArray(String key, byte[] val){ if(mArgBundle == null){ mArgBundle = new Bundle(); } mArgBundle.putByteArray(key, val); return this; }
public Builder withByteArray(String key, byte[] val){ if(mArgBundle == null){ mArgBundle = new Bundle(); } mArgBundle.putByteArray(key, val); return this; }
Bundle params = new Bundle(); params.putByteArray("photo", data); params.putString("caption", "Test photo upload"); mAsyncRunner.request("me/photos", params, "POST", new PhotoUploadListener(), null);
Bundle params = new Bundle(); params.putByteArray("file", data); Request request = new Request( Session.getActiveSession(), "me/staging_resources", params, HttpMethod.POST ); Response response = request.executeAndWait(); // handle the response
// facebook being either Facebook or AsyncFacebookRunner Bundle parameters = new Bundle(); parameters.putString("message", "MESSAGE TO GO WITH THE IMAGE"); parameters.putByteArray("source", imageBytes); facebook.request("me/photos", parameters, "POST");
private void postOnWall() { Bundle params = new Bundle(); params.putString("message", "New picture"); params.putByteArray("source", byteArray); mAsyncRunner.request("me/photos", params, "POST", new SampleUploadListener(), null); }
private void postOnWall() { Bundle params = new Bundle(); params.putString("message", "New picture"); params.putByteArray("source", byteArray); Log.d("Facebook-Example", mAsyncRunner == null ? "mAsyncRunner is null" : "mAsyncRunner not null"); mAsyncRunner.request("me/photos", params, "POST", new SampleUploadListener(), null); }
ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); byte[] bytes = baos.toByteArray(); Bundle bundle = new Bundle(); bundle.putByteArray("Bytes", bytes);
byte[] data = null; ByteArrayOutputStream baos = new ByteArrayOutputStream(); bmpImageGallery.compress(CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle postImgGallery = new Bundle(); // ADD THE PHOTO DATA TO THE BUNDLE postImgGallery.putByteArray("photo", data);
Bundle params = new Bundle(); try { params.putByteArray("photo",Utility.scaleImage(getApplicationContext(), photoUri)); } catch (IOException e) { e.printStackTrace(); } params.putString("caption", "Through My Android Application"); Utility.mAsyncRunner.request("me/photos", params, "POST",new PhotoUploadListener(), null);
byte[] data = null; ByteArrayOutputStream baos = new ByteArrayOutputStream(); Bitmap bmpImageCamera.compress(CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle postImgGallery = new Bundle(); // ADD THE PHOTO DATA TO THE BUNDLE postImgGallery.putByteArray("photo", data);
Intent i = new Intent(current_activity.this, Next_Activity.class); Bundle bundle = new Bundle(); bundle.putByteArray("photo", photo); // photo is an byte array you already stored data in it i.putExtras(bundle); startActivity(i);
Bundle parameters = new Bundle(); parameters.putString("message","YOUR_MESSAGE"); parameters.putString("caption","ANY_CAPTION"); parameters.putByteArray("picture", "IMAGE_LINK"); String response = facebook.request("me/photos", parameters, "POST");
Intent intent = new Intent(myListActivity., ImageActivity.class); Bundle bundle = new Bundle(); bundle.putByteArray("image", imageArray); intent.putExtras(bundle); startActivity(intent);
ByteArrayOutputStream stream = new ByteArrayOutputStream(); bmp.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray(); Bundle b = new Bundle(); b.putByteArray("image",byteArray); // your fragment code fragment.setArguments(b);