Shrikant
Shrikant

Reputation: 1

Offline upload photo to Facebook

Include the facebook api file and set the appId and appSecret

$facebook->setFileUploadSupport(true); 
$args = array('message' => 'Photo Uploaded'); 
$args['access_token'] = 'access token'; 
$filename = 'image.jpg' $args['image'] = '@' . realpath($filename); 
$result = $facebook->api('/' . $fuid . '/photos', 'post', $args);

My current app lets the user authorise off-line updates and I store the access_token, fuid. and I can succesfully post to a users wall when they are offline.but when i upload the photo to server it does not work. Can any body tell me the solution?

Upvotes: 0

Views: 412

Answers (1)

DMCS
DMCS

Reputation: 31870

Photos uploads is not the same as wall posts. They are two different permissions.

This is your workaround. Wall posts can contain a url to a website page that has the photo on it with proper og meta tags correctly specified. Happy coding!

Upvotes: 1

Related Questions