Trying to get privacy settings for an application using the Facebook Graph API

I use the Javascript SDK to login to facebook and request "publish_actions" for my application. Everything works for me, and I can publish photos in my application without problems. I use my own dialogue to give them the opportunity to comment and set the privacy setting to “Just Me”, “Friends” or “Public”.

When a user first tries to connect to facebook from my web application, they are asked to set the privacy level when posting photos (Just Me, Friends, Public, etc.). The problem I am facing is that I want to get this information later when the user sends the photo through my application so that I can see what privacy options are available for my dialogue. For instance:

The user is registered in my application, and for publish_actions, selects "Friends" as a privacy setting. Later, if they launch my application, I give them a choice to select "Just Me", "Friends" or "Publish", but I need to know that Publish is not allowed for this user. Currently, if they select a publication, it will return to Friends by default, as this is what was selected the first time I connected through my application.

I found examples of accessing permissions in the privacy_setting table using FQL, but not for a specific application (it also looks like you are leaving with versions after 2.0 in accordance with https://developers.facebook.com/docs/reference/fql/privacy_setting/ .

I could not find the endpoint in Graph Api to ensure that the privacy of applications for this application was configured.

Understand if anyone knows how to get this.

+5
source share

Source: https://habr.com/ru/post/1232864/


All Articles