ios Facebook Graph API - 发布音频文件
<p><p>我在 iOS 中使用 FB Graph API 在用户的墙上发帖。我想附上托管在其他地方的音频文件。由于“附件”似乎不再有效,我正在尝试将 og:audio 作为属性:</p>
<pre><code> SBJSON *jsonWriter = [ autorelease];
NSString *fileURL = ;
NSDictionary *properties = [NSDictionary dictionaryWithObjectsAndKeys:
fileURL, @"og:audio",
strText, @"og:audio:title",
nil];
NSString *propStr = ;
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"message Text",@"message",
@"Martha",@"name",
@"http://addr/something.jpg", @"picture",
propStr, @"properties",
nil];
;
</code></pre>
<p>不知何故,我得到的只是“og:audio”....作为帖子中的文本。
我想知道如何将音频文件作为播放器发布到帖子中。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><pre><code>-(void)postMeFeedButtonPressed{
NSMutableDictionary *variables = ;
;
;
;
FbGraphResponse *fb_graph_response = ;
NSLog(@"postMeFeedButtonPressed:%@", fb_graph_response.htmlResponse);
//parse our json
SBJSON *parser = [ init];
NSDictionary *facebook_response = ;
;
//let's save the 'id' Facebook gives us so we can delete it if the user presses the 'delete /me/feed button'
self.feedPostId = (NSString *);
NSLog(@"feedPostId, %@", feedPostId);
NSLog(@"Now log into Facebook and look at your profile...");
}
</code></pre>
<p>这将在嵌入式播放器中呈现音频内容。
希望它对某人有帮助。
谢谢</p></p>
<p style="font-size: 20px;">关于ios Facebook Graph API - 发布音频文件,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/8301118/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/8301118/
</a>
</p>
页:
[1]