how to check special permissions in facebook

后端 未结 4 1716
野的像风
野的像风 2021-01-11 15:52

how can i check in javascript if user has granted my site the publish stream permission

?

4条回答
  •  暖寄归人
    2021-01-11 16:16

    In the new Graph API (including via JavaScript) this can be accomplished by accessing "/[user]/permissions".

    From the User object documentation:

    permissions

    The permissions that user has granted the application.

    array containing a single object which has the keys as the permission names and the values as the permission values (1/0) - Permissions with value 0 are omitted from the object by default; also includes a type field which is always permissions.

提交回复
热议问题