1

I am trying to post to specific friend lists through php in combination with a facebook canvas app. When I call the app the first time I have to decide who can see the posts the app will do i.e. public, close friends or specific friend lists.

So when I've decided me for all friend lists and another friend list was added by user I can't post to this new friend list through php without adding this friend list manually on facebook. But that is exactly what I want to do. Is there any way to do that?

In addition: Getting those friend lists is not the problem.

EDIT

The following code doesn't work for me.

$response = (new FacebookRequest(
    $session,
    "POST",
    "/me/feed",
    array(
        "message"       => "Some message",
        "value"         => "CUSTOM",
        "friends"       => "SOME_FRIENDS",
        "allow"         => "listId"
    );
))->execute();
user289520
  • 145
  • 15
  • I don't really understand the problem, what do you mean with "another friend list was added by user"? how this other list was added? how you get the list? Would you mind please provide some steps to reproduce the error? also, which error are you getting back from the API? – Javier de la Cueva May 28 '15 at 11:05

1 Answers1

0

There´s a "privacy" field for that, as you can read in the docs: https://developers.facebook.com/docs/graph-api/reference/v2.4/user/feed#publish

Determines the privacy settings of the post. If not supplied, this defaults to the privacy level granted to the app in the Login Dialog. This field cannot be used to set a more open privacy setting than the one granted.

You can´t just use "value", "allow" and "deny" like that. Information about how to do that correctly can be found in several other threads:

Community
  • 1
  • 1
andyrandy
  • 72,880
  • 8
  • 113
  • 130