facebook login Cannot pass a publish or manage permission (email) to a request for read authorization

后端 未结 2 1356
清歌不尽
清歌不尽 2021-01-02 03:06

I have a button click to login facebook,but sometimes this code can\'t work. throw exception:Caused by:

com.facebook.FacebookException: Cannot pass a publis         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-02 03:40

    You can't call openForPublish unless your app has already been granted basic permissions first.

    Separate out your PERMISSIONS list into PERMISSIONS_READ and PERMISSIONS_PUBLISH, and put "email" into the PUBLISH side. Then call openForRead, and then requestNewPublishPermissions when your session is open.

提交回复
热议问题