1

I'm working on an fb-app which does offline-publishing on behalf of its users and I cannot get the privacy parameter working.

The facts:

  • app is authorized with publish_actions permission
  • simple publishing works: without any privacy-parameter the posts get the default visibility which was chosen during authorization process
  • publishing with reduced visibility also works. This one reduces the default visibility (public) to only friends: privacy={'value':'ALL_FRIENDS'}

Now I want to publish and limit the visibility to a explicit list of users. According to this doc https://developers.facebook.com/docs/reference/api/privacy-parameter/ I can combine 'value' and 'allow', so I used this parameter:

{'value': 'CUSTOM', 'allow': '{ REAL_ID }'}

but unfortunately this is the response:

{"error":{"message":"(#100) 'friends' value was not recognized","type":"OAuthException","code":100}}

Although the friends-parameter is deprecated, I tried these combinations as well with no luck:

{'value': 'CUSTOM', 'allow': 'ALL_FRIENDS'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}


{'value': 'CUSTOM', 'allow': 'ALL_FRIENDS', 'deny': '{ REAL_ID }'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}


{'value': 'CUSTOM', 'friends': 'ALL_FRIENDS'}
-> {"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1}}


{'value': 'CUSTOM', 'friends': 'SOME_FRIENDS', 'allow': '{ REAL_ID }'}
-> {"error":{"message":"(#100) 'friends' value was not recognized","type":"OAuthException","code":100}}

It would be great if someone could help because I am completely lost on this one :(

Thanks in advance!

4

1 回答 1

6

Ok, after contacting facebook-support I will answer my own question. Maybe it helps someone else...

1) The examples fb uses in their documentation is confusing:

"privacy={'value': 'CUSTOM', 'allow': '{friend-list-id}'}"

The outer brackets are correct, the inner ones are meant to be replaced with your friends-id or friends-ids as comma separated list. So a valid parameter would be:

"privacy={'value': 'CUSTOM', 'allow': '1234567,3456789'}"

2) The CUSTOM value for privacy is not supported when publishing with an app-access-token. Only user-access-token supports this.

于 2013-09-10T14:41:06.390 回答