2012-01-04 87 views
3

我有一個關於在Facebook上發佈信息的2部分問題。從iPhone/iPad發佈到信息Facebook

1 -我要預先填充的用戶要張貼即它說:消息「說說這個......」。這可能嗎?如果是這樣,怎麼樣?目前,我有以下的設置來產生後如下圖所示:

NSMutableDictionary *params = 
    [NSMutableDictionary dictionaryWithObjectsAndKeys: 
    @"Steak Expert", @"name", 
    @"The must-have iPhone/iPad app for carnivores!", @"caption", 
    @"Steak Expert helps you to cook every steak to perfection! With this app in your hand you'll never need to worry about over-cooking or under-cooking a steak again. Perfection every time! ", @"description", 
    @"https://m.facebook.com/apps/MY_APP_ID/", @"link", 
    @"http://fbrell.com/f8.jpg", @"picture", 
    @"Cooking a steak using Steak Expert!", @"message", // I thought this would be the required field to populate the text 
    nil]; 
    [facebook dialog:@"feed" andParams:params andDelegate:nil]; 

enter image description here

2 -我的問題的另一部分是根據各地上面顯示的視圖。是否有可能自動張貼到牆上而不需要此視圖出現?看到用戶必須授權應用程序甚至連接到Facebook(加上其他任何指定的操作),我看不出這是一個問題。如果是這樣,請有人建議如何實現這一目標?

回答

6

這是您所說的message字段。

message - 該字段將在2011年7月12日被忽略用於預填寫用戶將輸入的文本字段的消息。要符合Facebook平臺政策,您的應用程序可能只會設置此字段,如果用戶手動生成工作流程中較早的內容。大多數應用程序不應該設置它。

http://developers.facebook.com/docs/reference/dialogs/feed/

希望這有助於

0

由於@Illep指出,信息欄不再適用於該對話框的帖子。

要回答第二個問題,您可以使用圖形API直接發佈到用戶的牆上而不顯示對話框。看看文檔here。您可以使用以下代碼編寫消息:

// Set parameters 
NSMutableDictionary *params = [NSMutableDictionary dictionary]; 
[params setObject:FACEBOOK_ACCESS_TOKEN forKey:@"access_token"]; 
[params setObject:@"Some preset message" forKey:@"message"]; 

// Make the request to the graph API 
[_facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];