我正在使用Facebook SDK,一般来说,它运行正常。但是当我发布一个新的提要时,它只出现在我的时间轴上而不是我朋友的新闻(他们的Facebook主页)。
所以想要查看我的Feed的朋友必须转到我的个人资料 - 这不是我想要的。
我的脸书应用程序中是否有必须更改的设置? Facebook开发者门户网站中的这个设置是什么?
编辑:
抱歉,我忘记了语言!我在iOS SDK中编程。
这里是发布新Feed的代码:
-(IBAction)publishStream:(id)sender
{
String *myString = "Test string!"
SBJSON *jsonWriter = [[SBJSON new] autorelease];
//post's link
NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Download iPhone app",@"text", //link name
@"http://itunes.apple.com/it/app/id399663397?mt=8",@"href", //link url
nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
//post image
NSDictionary* media = [NSDictionary dictionaryWithObjectsAndKeys:
@"image", @"type", //type of media
@"http://img834.imageshack.us/xxx.png", @"src", //image link
@"http://itunes.apple.com/it/app/idxxxxx", @"href", nil]; //if image is clicked go to link "x"
NSArray * arraymedia = [NSArray arrayWithObject:media];
//image and post links
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"My app name", @"name", //name near image
arraymedia, @"media",
myString, @"caption", //caption - little image under our app
@"http://itunes.apple.com/it/app/idxxxxx/", @"href", nil];//link of caption
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
//post settings
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key", //fb api key
@"Share on Facebook", @"user_message_prompt", @"Post test for my app", @"message", //user can modify message post actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog: @"stream.publish"
andParams: params
andDelegate:self];
}