Facebook SDK:发贴到墙只能看到我的测试目的? [英] Facebook SDK: post to wall only visible for me for testing purposes?
问题描述
当我使用iOS SDK的Facebook SDK测试我的代码时,我所有的朋友都可以看到我的墙上的所有信息。
对于我所有的测试目的,我想要限制发布。
在Facebook页面/首选项/应用程序中,我可以设置我自己的名字中的帖子的可见性。当我将其改为只有我时,将新内容发布到我的墙上不再工作( - >请求didFailWithError)。
when i test my code using the Facebook SDK for iOS, all my post to my wall are visible for all my friends. For all my testing purposes, i want to be able to restrict the postings. Within the Facebook page/preferences/Applications, i´m able to set the visibility for "post within my own name". When i change that to "only me", posting new content to my wall don´t work anymore (-> "Request didFailWithError").
此外,每次将新版本部署到我的iPad后,此偏好将重置为默认值。
Furthermore this preference will be reseted back to the default, after each deploy of a new build to my iPad.
所以我想问你,如果有能力直接在我的iOS应用程序中设置?
感谢您的帮助。
Therefore i want to ask you, if there´s the ability to set it directly within my iOS app? Thanks for your help.
编辑:
无法完成。当我输出我的请求,我得到这个NSLog:
Can´t get it done. When i output my request, i get this 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 = "https://s-static.ak.facebook.com/rsrc.php/v1/yzwe/r/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];
}
有什么帮助吗?
感谢
(许可状态:)
Any help on that? Thanks (Permission state:)
NSArray * permissions = [[NSArray alloc] initWithObjects:
@read_stream,@publish_stream,@user_photos,nil];
NSArray *permissions = [[NSArray alloc] initWithObjects: @"read_stream", @"publish_stream", @"user_photos", nil];
推荐答案
我通常只是在Facebook上使用一个没有朋友的测试用户。为我工作!
I normally just use a test user on facebook with no friends. works for me!
这篇关于Facebook SDK:发贴到墙只能看到我的测试目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!