Changing privacy settings using Facebook SDK in cs

2019-09-07 05:12发布

问题:

If I use these parameters and upload image or update status then it is uploading/updating in Audience as Public. But i need to change Audience to only me.

var parameters = new Dictionary<string, object>
{
    { "message", FacebookMessage },
    { "privacy", new Dictionary<string, object>
        {
            { "value", "ALL_FRIENDS" }
        }
    }
};

I tried replacing "ALL_FRIENDS" as "ONLY_ME" but error is thrown.

回答1:

Try giving SELF in the value for value key of the privacy dictionary.

 {"value", "SELF"}

Please see this question as well: facebook c# api, video getting uploaded but its PUBLIC