Created
March 12, 2014 20:10
-
-
Save niraj-shah/9515270 to your computer and use it in GitHub Desktop.
Script to upload a photo by URL (i.e. remote resource). Use code with https://gist.github.com/niraj-shah/9514525
This file contains 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 | |
// upload a photo to facebook by URL, will return id of uploaded photo | |
$photo_uploaded = $facebook->api( $page_id . "/photos", "POST", array( | |
'url' => 'http://healthhub.co/wp-content/uploads/2014/02/Group-Slider.jpg', // remote URL to image | |
'no_story' => true // suppress automatic image upload story, optional | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment