Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As you might know, to post anything, you need to define a JSON string containing the stream publish contents.</p> <p>As you need a link to the audio file, you need to provide it as part of the action_links parameter. Take a look at the Facebook doc for more info (look for action_links): <a href="http://developers.facebook.com/docs/reference/rest/stream.publish" rel="nofollow">http://developers.facebook.com/docs/reference/rest/stream.publish</a></p> <p>If what you need to do is to include the media directly: Take a look at this (look at "Including Media in the Attachment"): <a href="http://developers.facebook.com/docs/guides/attachments" rel="nofollow">http://developers.facebook.com/docs/guides/attachments</a></p> <p>This is how Im posting links, to anything (some code snippets I haven't tested):</p> <pre><code>//1. Create an array containing the action links. Each action link is a dictionary. NSDictionary* actionLinks = [NSArray arrayWithObjects: [NSDictionary dictionaryWithObjectsAndKeys: @"link to google",@"text", @"http://www.google.com/",@"href", nil], nil ]; //2. convert the dictionary to a JSON string SBJSON *jsonWriter = [[[SBJSON alloc] init] autorelease]; NSString *actionLinksAsJSON = [jsonWriter stringWithObject:actionLinks]; //3. Pass it as a parameter on the parameters dictionary NSMutableDictionary* params = [NSMutableDictionary dictionary]; [params setObject: theAPIKey forKey:@"api_key"]; [params setObject: theMessage forKey:@"user_message_prompt"]; [params setObject: actionLinksAsJSON forKey:@"action_links"]; [params setObject: attachmentAsJSON forKey:@"attachment"]; [params setObject: targetId forKey:@"target_id"]; NSLog(@"Parameters in stream.publish are: \n%@", params); [self.facebook dialog: @"stream.publish" andParams: params andDelegate: self]; </code></pre> <p>I hope this helps, good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload