Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use publish_stream permission - Facebook SDK for Android 3.0

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
like image 611
emeraldhieu Avatar asked Nov 28 '12 04:11

emeraldhieu


1 Answers

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.

like image 75
alexleutgoeb Avatar answered Nov 19 '22 19:11

alexleutgoeb