views:

427

answers:

2

I have an application I'm writing, in Objective-C(iPhone), and I want to be able to write a string of text to Pastie or Pastebin, and be able to have the link to that page. I have not been able to find any API for either of these, is this possible? How?

Thanks!

A: 

I assume you're talking about copy-and-paste functionality. It's called "Pasteboard".

As usual, there are a ton of gotchas and best practices. I just got done watching the WWDC video on this topic, and I recommend doing a bit of research first.

Chris McCall
+2  A: 

You will have to construct a HTTP POST request with the fields as described in the <form> tag on the html page.

for pastebin.com it would probably be parent_pid, format, code2 and poster.

Just make sure that the owner of the site doesn't have any problems with your program accessing it this way.

cube