如何在Facebook上發佈帶有文本的圖像?我知道如何發佈文字,鏈接,但我也想發佈圖片。發佈圖像與來自android的facebook上的文本
這是我曾嘗試:
byte[] data = null;
Bitmap bi = BitmapFactory.decodeFile("R.drawable.plate1");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bi.compress(Bitmap.CompressFormat.JPEG, 100, baos);
data = baos.toByteArray();
parameters.putByteArray("picture", data);
int plate = getResources().getIdentifier("com.b2creativedesigns.eyetest:drawable/plate1", null, null);
parameters.putString("picture", String.valueOf(plate));
兩人都不工作。當我嘗試發佈時,沒有任何反應。沒有發佈。使用下面的代碼,它可以工作。
從網站發佈圖片很簡單,但當網站關閉或修改鏈接時,它不起作用。
parameters.putString("picture", "https://lh3.ggpht.com/f79UCpnLisZxO2P2C43f55YLvFpNco_cTcC-t9Ck-Qmqe5jwKbfnUvCh5N6-Te-mOw=w124");
第三個例子:
byte[] data = null;
Bitmap bi = BitmapFactory.decodeFile("R.drawable.plate1");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bi.compress(Bitmap.CompressFormat.JPEG, 100, baos);
data = baos.toByteArray();
parameters.putString("method", "photos.upload");
parameters.putByteArray("picture", data);
這沒有幫助。我更新了我的問題。 – erdomester 2012-08-17 19:39:46
更新了我的答案,請嘗試我的新建議,並讓我知道如果可行。 – 2012-08-17 21:51:18
這是去創造這樣的東西? (http://www.johnhaydon.com/wp-content/uploads/2012/01/friends-can-comment.png)看,這是一個發佈的文本,帶有鏈接和圖像。我想要這個,不只是發佈圖片。 – erdomester 2012-08-19 07:00:04