Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitpic API from iPhone - pic posted but no URL returned?
    primarykey
    data
    text
    <p>This is a weird one...</p> <p>With the help of people here, I've got my iPhone app posting to TwitPic successfully - and when I first got it working, I could see an XML result being returned too...</p> <p>But for some reason over the past two days, the API call seems to succeed - the pic appears on TwitPic - but... the response seems to be empty...</p> <p>Anyone have any ideas? Seen anything similar? The code I use to invoke the API call is:</p> <pre><code> ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; [request setData:twitpicImage forKey:@"media"]; [request setPostValue:username forKey:@"username"]; [request setPostValue:password forKey:@"password"]; // Initiate the WebService request [request start]; // Need to find out how I can access the result from this call... /* Result structure should be: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;rsp stat="ok"&gt; &lt;mediaid&gt;abc123&lt;/mediaid&gt; &lt;mediaurl&gt;http://twitpic.com/abc123&lt;/mediaurl&gt; &lt;/rsp&gt; */ // Check for errors if ([[request responseHeaders] objectForKey:@"stat"] != @"ok"){ UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"TwitPic Submission" message:[[request responseHeaders] objectForKey:@"mediaurl"] delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil]; [errorAlert show]; [errorAlert release]; } NSString *twitpicURL = [[request responseHeaders] objectForKey:@"mediaurl"]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TwitPic Submission" message:twitpicURL delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil]; </code></pre> <p>I tried just dumping out [request responseString]... that's empty now also. That WAS showing a response, for sure.</p> <p>As always, any help gratefully received. I'll give back once I'm able!</p> <p>Cheers,</p> <p>Jamie.</p>
    singulars
    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.
    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.
 

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