2
我在iOS中使用FB Graph API在用戶牆上發帖。我想附上其他地方託管的音頻文件。作爲「附件」似乎不再有效,我想OG:音頻物業:ios Facebook Graph API - 發佈音頻文件
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSString *fileURL = [NSString stringWithFormat:@"http://site-addr.com/%@", @"tst.mp3"];
NSDictionary *properties = [NSDictionary dictionaryWithObjectsAndKeys:
fileURL, @"og:audio",
strText, @"og:audio:title",
nil];
NSString *propStr = [jsonWriter stringWithObject:properties];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"message Text",@"message",
@"Martha",@"name",
@"http://addr/something.jpg", @"picture",
propStr, @"properties",
nil];
[facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
不知怎的,我得到的是「OG:音響」 ......爲文成職。 我不知道如何將音頻文件作爲播放器發佈到帖子中。
嗨我已經使用此代碼但嵌入式播放器不起作用。我的音頻文件URL是http://bit.ly/Ok4ZX6。 。 。並在Facebook上顯示,如http://i.stack.imgur.com/Ld67c.png –