Facebook的SDK为Android

Facebook的SDK为Android

本文介绍了不能使用publish_stream权限 - Facebook的SDK为Android 3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  session.openForRead(新Session.OpenRequest(activity).setCallback(statusCallback).setPermissions(Arrays.asList(permissions)));
 

我试图通过publish_permission以setPermission如上时出现此错误。为什么?如何解决?你在哪里Facebook的开发者?

  com.facebook.FacebookException:不能传递一个发布许可(publish_stream)为读授权的请求
 

解决方案

随着错误消息指出您尝试使用读会议>发布许可。由于SDK 3.0您已经阅读区分和发布行为,所以如果你想使用 publish_stream 你必须调用 session.openForPublish( session.reauthorizeForPublish(。

session.openForRead(new Session.OpenRequest(activity).setCallback(statusCallback).setPermissions(Arrays.asList(permissions)));

I get this error when trying to pass "publish_permission" to setPermission as above. Why? How to fix? Where are you Facebook developers?

com.facebook.FacebookException: Cannot pass a publish permission (publish_stream) to a request for read authorization
解决方案

As the error message states you are trying to open a read session with a publish permission. Since SDK 3.0 you have to distinguish between read and publish actions, so if you want to use publish_stream you have to call session.openForPublish( or session.reauthorizeForPublish( after your first request.

这篇关于不能使用publish_stream权限 - Facebook的SDK为Android 3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 20:59