如何在开始直播时更新FBSDKGraphRequest中的privacy参数?

How can I update the privacy parameter in FBSDKGraphRequest when starting a live video?

我正在尝试更新隐私参数,以便将我的应用启动的实时视频发布到用户的时间线上,并将隐私设置为 "ALL_FRIENDS"。我查看了文档,但我想出的代码不起作用:

NSString* livePath =  [@"/" stringByAppendingPathComponent:[token.userID stringByAppendingPathComponent:@"live_videos"]];
FBSDKProfile *profile = [FBSDKProfile currentProfile];

if(profile.userID){
    livePath = [@"/" stringByAppendingPathComponent:[profile.userID stringByAppendingPathComponent:@"live_videos"]];
}

NSMutableDictionary* param = @{
                               }.mutableCopy;
[param setObject:@"Test Title" forKey:@"title"];
[param setObject:@"Test Description" forKey:@"description"];
[param setObject:@"privacy" forKey:@"{@\"value\": \"ALL_FRIENDS\"}"];
[[[FBSDKGraphRequest alloc] initWithGraphPath:livePath
                                   parameters:param
                                  tokenString:token.tokenString
                                      version:@"v2.6"
                                   HTTPMethod:@"POST"]
 startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { //More code here }

我使用 Facebook 的图表浏览器 (https://developers.facebook.com/tools/explorer/?method=POST&path=118477909176601%2Flive_videos&version=v3.2&privacy=%7B%27value%27%20%3A%20%27ALL_FRIENDS%27%7D&classic=0) 解决了这个问题。设置参数以更新隐私设置的代码如下。

[[[FBSDKGraphRequest alloc] initWithGraphPath:livePath
                                   parameters:@{ @"privacy": @"{'value' : 'ALL_FRIENDS'}",}
                                  tokenString:token.tokenString
                                      version:@"v2.6"
                                   HTTPMethod:@"POST"]
 startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {