开发者

How to give SD Card File Path in following Code?

How to give SD Card File Path in following Code?

String s="file:///sdcard/tempImage.png";
parameters.putString("attachment","{\"name\":\"Android Facebook application By Martin\",\"href\":\"http://www.google.com/\",\"caption\":\"By google Technology \",\"description\":\"Description :- Android and iphone application \",\"media\":[{\"type\":\"image\",\"src\":\'"+ s + "',\"href\":\"http://s.facebook.com/connect.php?tab=i开发者_高级运维phone/\"}],\"properties\":{\"another link\":{\"text\":\"for more tips click here\",\"href\":\"http://www.google.com/\"}}}");

I use Above Code for Upload Image on Facebook Wall from my SD Card. But the Above Code is not Work, Please Help me.


Try below code

File mFile = new File(Environment.getExternalStorageDirectory(), tempImage.png);


String filePath=Environment.getExternalStorageDirectory()+"/tempImage.png";
File mFile = new File(filePath);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜