I can post on group / page and user wall, but i don’t want my app to show error when posting on selected wall, if the selected wall doesn’t allow posting so is there any way to know that are we able to post on target wall?
Note: I found two similar questions but they do not pertain to exactly what i want
1 Application able to post on user’s Wall
2 How to check the permission whether a friend allow me to post on his wall or not using php sdk
Please discuss in comment before taking any negative action.
Thanks.
AFAIK, there’s no way to check exactly the way you want, coz the privacy varies, as you have already said. The only privacy setting that can be queried is the
OPEN, CLOSED, or SECRETof group, which can be done by calling the graph api:That returns json data that has a field
privacy, which will be one ofOPEN, CLOSED, or SECRET.But on top of that you have settings for groups where you can restrict posting to only group admins. And that permission can not be checked.
So i think what you’ll have to do is check the returned value, i.e
$responseafter making the post. If the permission is not given, then the returned data looks like this:Hence you can check if
$responsehas “error” field, and inform the user accordingly. Somewhat like this:if(isset($response['error'])).Also check the fql table that represents groups for more info, if you haven’t already.