Note that there are some explanatory texts on larger screens.

plurals
  1. POFBConnect facebook.stream.publish with NSDictionary problems
    primarykey
    data
    text
    <p>I have this code that can't send a Facebook request until now. </p> <pre><code>NSDictionary *firstDict = [NSDictionary dictionaryWithObjectsAndKeys: @"image", @"Type", @"http://mysite.com/image.jpg", @"src", @"http://mysite.com/page.html", @"href", nil]; NSDictionary *secondDict = [NSDictionary dictionaryWithObjectsAndKeys: @"image", @"Type", @"http://mysite.com/image.jpg", @"src", @"http://mysite.com/page.html", @"href", nil]; NSArray *mediaArray = [[NSArray alloc] initWithObjects:firstDict, secondDict, nil]; NSArray *keys = [NSArray arrayWithObjects:@"name", @"description", @"href", @"media", nil]; NSArray *objects = [NSArray arrayWithObjects: [NSString stringWithString:@"MyTitle"], [NSString stringWithString:@"My caption"], [NSString stringWithString:@"http://mysite.com/page.html"], mediaArray, nil]; NSDictionary *attachment = [NSDictionary dictionaryWithObjects:objects forKeys:keys]; [[FBRequest requestWithDelegate:self] call:@"facebook.stream.publish" params:attachment]; </code></pre> <p>I took this sample : <a href="http://forum.developers.facebook.com/viewtopic.php?pid=145965" rel="nofollow noreferrer">http://forum.developers.facebook.com/viewtopic.php?pid=145965</a></p> <p>But every time I run it, the console shows the following:</p> <pre><code> { "api_key" = adc8d70987098sdc; "call_id" = 23456767; description = "Any user's description"; format = XML; href = "http://mysite.com/page.html"; media = ( { Type = image; href = "http://mysite.com/page.html"; src = "http://mysite.com/image.jpg"; }, { Type = image; href = "http://mysite.com/page.html"; src = "http://mysite.com/image.jpg"; } ); method = "Facebook.streamPublish"; name = aName; "session_key" = "d0f98bfs89b7fg7v"; sig = 89v0d9fv879fgv; ss = 1; v = "1.0"; } </code></pre> <p>It shows parentheses for array instead brackets, is that normal?.</p> <p>Then it displays the error:</p> <pre><code>*** -[NSCFArray dataUsingEncoding:]: unrecognized selector sent to instance 0x12fcb0 2009-10-30 13:54:27.758 GeoPixr[307:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: *** -[NSCFArray dataUsingEncoding:]: unrecognized selector sent to instance 0x12fcb0 </code></pre> <p>The [session resume] call returns TRUE.</p> <p>Thanks in advance.</p>
    singulars
    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.
 

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