我正在使用 Facebook SDK,总的来说,它工作正常。但是当我发布一个新的提要时,它只会出现在我的时间线上,而不是我朋友的新闻(他们的 Facebook 主页)中。
所以想要看到我的提要的朋友必须去我的个人资料——这不是我想要的。
我的 Facebook 应用程序中是否有我必须更改的设置?这个设置在 Facebook 开发者门户的什么地方?
编辑:
对不起,我忘记了语言!我正在使用 iOS SDK 进行编程。
这里是发布新提要的代码:
-(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];
}