我正在开发一个应用程序,需要我发布一个音频文件到facebook帐户。我正在通过FBStream发布它,并在
NSString *str = @"{'media': [{
'type': 'music',
'src': 'http://www.looptvandfilm.com/blog/Radiohead%20-%20In%20Rainbows/01%20-%20Radiohead%20-%2015%20Step.MP3',
'title': '15 Step',
'artist': 'Radiohead',
'album': 'In Rainbows'
}]}";
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: str, @"attachment" ,nil,@"message",nil];
[[FBRequest requestWithDelegate:self] call:@"facebook.stream.publish" params:params];我可以发布/发布我的图片和视频到facebook使用相同的模式,但当我尝试此代码时,它显示“类型音乐不受支持”。我从http://developers.facebook.com/docs/guides/attachments获得了这个字符串值。
请帮我把它弄出来。
发布于 2010-12-22 14:12:02
您可以通过使用此字符串(Str)格式来发布它。
NSString *str = @"{'media': [{
'type': 'mp3',
'src': 'http://www.looptvandfilm.com/blog/Radiohead%20-%20In%20Rainbows/01%20-%20Radiohead%20-%2015%20Step.MP3',
'title': '15 Step',
'artist': 'Radiohead',
'album': 'In Rainbows'
}]}";https://stackoverflow.com/questions/4396274
复制相似问题