简体   繁体   English

从 iOS 应用程序发布给用户 Facebook 墙

[英]Post to the users Facebook wall from an iOS app

I know this has been asked a lot here, but none of the answers seem to work for me:( I'm trying to post text to the users Facebook wall from my iPhone app. I already have the Facebook delveloper stuff set up, and almost everything is working. Almost.我知道这里被问了很多,但似乎没有一个答案对我有用:(我正在尝试从我的 iPhone 应用程序向用户 Facebook 墙发布文本。我已经设置了 Facebook 开发人员的东西,并且几乎一切正常。几乎。

facebook = [[Facebook alloc] initWithAppId:@"123813234381280"];

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"] 
    && [defaults objectForKey:@"FBExpirationDateKey"]) {
    facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
    facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
}
if (![facebook isSessionValid]) {
    NSArray* permissions =  [[NSArray arrayWithObjects:
                              @"publish_stream", nil] retain];

    [facebook authorize:permissions delegate:self];
}

 NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"123813234381280", @"app_id",
                               @"http://test.com/", @"link",
                               @"Test-Name", @"name",
                               //@"Reference Documentation", @"caption",
                               @"Download the app NOW from the App Store", @"description",
                               @"Test-Message",  @"message",
                               nil];


[facebook dialog:@"feed" andParams:params andDelegate:self];

Now there appears a dialog, but the textfield where it should say "Test-Message" in it is empty.现在出现了一个对话框,但是应该在其中显示“Test-Message”的文本字段是空的。 You know, the one where it says what to post on the wall.你知道的,上面写着要在墙上张贴什么。 Everything else works, the description, the link, the name.其他一切都有效,描述、链接、名称。 Everything besides the message.除了消息之外的一切。

Can anybody help me?有谁能够帮我?

Facebook is now ignoring the message parameter: Facebook 现在忽略消息参数:

http://developers.facebook.com/blog/post/510/ http://developers.facebook.com/blog/post/510/

message: This field will be ignored on July 12, 2011 The message to prefill the text field that the user will type in. To be compliant with Facebook Platform Policies, your application may only set this field if the user manually generated the content earlier in the workflow.消息:此字段将在 2011 年 7 月 12 日被忽略 用于预填充用户将输入的文本字段的消息。为了符合 Facebook 平台策略,如果用户之前手动生成内容,您的应用程序只能设置此字段工作流程。 Most applications should not set this.大多数应用程序不应设置此项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM