我目前使用的代碼實際上與Facebook's documentation中的示例相同,用於使用presentFeedDialogModallyWithSession發佈到用戶的牆上。在通過SDK發佈到Facebook時向caption參數添加URL?
有沒有辦法讓將URL與發送到帖子的「caption」參數相關聯,還是隻能將其顯示爲靜態文本?
- (IBAction)publishButtonAction:(id)sender {
// Put together the dialog parameters
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Facebook SDK for iOS", @"name",
//----------------------------------------------------
// can we add a URL for the caption parameter here?
@"Build great social apps and get more installs.", @"caption",
//----------------------------------------------------
@"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps.", @"description",
@"https://developers.facebook.com/ios", @"link",
@"https://raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png", @"picture",
nil];
// Invoke the dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
// handle the result...
}];
}
似乎文檔沒有指示的方式做到這一點,但只是想檢查,看看也許我錯過了一個細節,那是不是從文檔顯而易見的。
在此先感謝...