Created
December 11, 2011 20:01
-
-
Save jcleblanc/1462424 to your computer and use it in GitHub Desktop.
Reddit PHP SDK Sample to Submit New Story
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once("reddit.php"); | |
| //initialize logged-in connection | |
| $reddit = new reddit("USERNAME", "PASSWORD"); | |
| //submit new story | |
| $title = "British coffee-powered car breaks world record"; | |
| $link = "http://www.extremetech.com/extreme/97287-british-coffee-powered-car-breaks-world-record"; | |
| $response = $reddit->createStory($title, $link); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment