gpt4 book ai didi

ios - 如何使用 facebook sdk 在 friend 的墙上发帖?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:35:15 25 4
gpt4 key购买 nike

我正在使用 facebook SDK 3.13 通过 fbwebdialogs 在用户的 friend 墙上发帖。当我为此对话框设置参数时,它不会在对话框中显示它们。

    NSMutableDictionary *params=[NSMutableDictionary new];
FBSession *ses=[FBSession activeSession];
[params setValue:@"hello" forKey:@"caption"];
[params setValue:@"hello" forKey:@"decription"];
[params setValue:@"whats" forKey:@"name"];
[params setValue:@"http://i.imgur.com/g3Qc1HN.png" forKey:@"picture"];
[params setValue:@"http://www.dsvv.org" forKey:@"link"];

[FBWebDialogs presentFeedDialogModallyWithSession:ses parameters:params handler:^(FBWebDialogResult result,NSURL *url,NSError *error){

if (error) {

}

}];

}

它不识别这些链接并产生错误。如果有人在用户的 friend 墙上发帖,请通知我。

最佳答案

str_link = @"www.google.com";

NSString *str_img = [NSString stringWithFormat:@"%@uploads/%@-5.jpg",app.Main_url,[Data_Dict objectForKey:@"deal_id"]];
//NSLog(@"%@",str_img);


NSDictionary *params = @{
@"name" : str_name,
@"caption" : @"",
@"description" : @"",
@"picture" : str_img,
@"link" : str_link,
@"to":str_id,
};


// Invoke the dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
NSLog(@"Error publishing story.");
[self.indicator stopAnimating];
} else {
if (result == FBWebDialogResultDialogNotCompleted) {
NSLog(@"User canceled story publishing.");
[self.indicator stopAnimating];
} else {
NSLog(@"Story published.");
[self.indicator stopAnimating];
}
}}];

关于ios - 如何使用 facebook sdk 在 friend 的墙上发帖?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22828476/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com