photo-upload

ObjectiveFlickr Photo Upload Error

六月ゝ 毕业季﹏ 提交于 2019-12-03 21:14:22
I'm working on using the ObjectiveFlickr library to upload photos to Flickr from my iPhone app. I am able to authorize the app and perform general requests, but I am getting an error while trying to upload a photo. The photo is meant to be uploaded is an image captured using AVFoundation. Here is the relevant code: UIImage *image = [[UIImage alloc] initWithData:imageData]; if ([[AppDelegate sharedDelegate].apiContext.OAuthToken length]) { NSData *uploadData = UIImageJPEGRepresentation(image, 1); if (!flickrRequest) { flickrRequest = [[OFFlickrAPIRequest alloc] initWithAPIContext:[AppDelegate

Facebook PHP SDK app to upload photo to page

南笙酒味 提交于 2019-12-01 20:30:46
I am trying to create a Facebook application that uploads images to a page. I can manage to upload photos to the user's photo album but not to the page's. Here's my code: require_once('php-sdk/facebook.php'); $config = array( 'appId' => 'XXXXXXXX', 'secret' => 'YYYYYYYYYYYYYYYY', 'fileUpload' => true, ); $facebook = new Facebook($config); $user_id = $facebook->getUser(); $photo = $_POST['image']; $message = "Lorem ipsum"; echo $user_id; if ($user_id) { $ret_obj = $facebook->api('/XXXXXXXXXX/photos', 'POST', array( 'access_token' => $access_token, 'source' => '@' . $photo, 'message' => $message

Exception when uploading photo with Facebook Graph API

大憨熊 提交于 2019-11-30 10:17:24
I would like to upload a photo to facebook for a user in the default album for an application. This is described under publishing here: http://developers.facebook.com/docs/reference/api/photo The method has been answered here: How can I upload photos to album using Facebook Graph API . I am using the following: $args = array( 'message' => 'Photo Caption', 'image' => '@'.realpath("image.png") ); $data = $facebook->api('/me/photos', 'post', $args); However I get the exception "(#324) Requires upload file" when I attempt this. I have a valid session and I have the publish_stream and user_photos