4

如何将照片和视频从相机或画廊上传到 android 中的 fb 帐户?你能给我建议来解决这个问题吗?我可以使用以下代码在 fb 帐户中发布状态..

AsyncFacebookRunner mAsyncFbRunner = new AsyncFacebookRunner(mFacebook);
        Bundle params = new Bundle();
        params.putString("message", review);        
        params.putString("picture", "http://twitpic.com/show/thumb/6hqd44");
        mAsyncFbRunner.request("me/feed", params, "POST",
                new WallPostListener());

提前致谢

4

1 回答 1

1

试试看 -

上传图片,

 Bundle params = new Bundle();

 params.putByteArray("picture", <image in bytes>);
 params.putString("message", "Have fun");

 mAsyncRunner.request("me/photos", params, "POST", new SampleUploadListener()); 

上传视频,

Bundle params = new Bundle();

param.putString("filename", <dataName>);
param.putByteArray("video", <data in bytes>);

 mAsyncRunner.request("me/videos", param, "POST", new SampleUploadListener()); 
于 2012-04-12T11:53:46.163 回答