在 Android 上使用 Graph API 向 Facebook 发送图片
我一整天都在寻找这个,当我找到一些东西时,我发现它不是我要找的。简而言之,我正在升级我的应用程序以使用适用于 Android 的 Facebook 图形 API,但文档非常糟糕。我想要的只是将图片上传到应用程序的默认相册中。我有以下代码:
Facebook f = new Facebook(APP_ID); Bundle parameters = new Bundle(); parameters.putString("message", caption); parameters.putByteArray("picture", data); f.dialog(mContext, "publish.stream", parameters, this); //TODO: This is wrong
我认为publish.stream 是什么问题,因为我在进行“这没有祈祷”测试时得到的异常是 malformedURLException。
有人可以告诉我我是否走在正确的轨道上吗?
谢谢, 杰克
I have been searching for this all day and just when I find something, I find it is not what I am looking for. In short, I am upgrading my app to use the Facebook graph API for Android and the documentation is horrible. All I want is to upload a picture into the default album for the app. I have the following code:
Facebook f = new Facebook(APP_ID); Bundle parameters = new Bundle(); parameters.putString("message", caption); parameters.putByteArray("picture", data); f.dialog(mContext, "publish.stream", parameters, this); //TODO: This is wrong
I think the publish.stream is what is the problem because the exception that I got when I did my "this doesn't have a prayer" test was a malformedURLException.
Can someone tell me if I am even on the right track?
Thanks,
Jake
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论