0

I have a situation here I am preparing a custom post for facebook like this

[newRequest setPostValue:@"http://photos-e.ak.fbcdn.net/hphotos-ak-snc6/230638_106558809431344_100002316768096_62076_5620590_s.jpg" forKey:@"picture"];
[newRequest setPostValue:@"nem appears here??" forKey:@"name"];
[newRequest setPostValue:@"caption appears here??" forKey:@"caption"];
[newRequest setPostValue:@"description appears here??" forKey:@"description"];
[newRequest setPostValue:@"http://google.com" forKey:@"link"];

[newRequest setPostValue:_accessToken forKey:@"access_token"];
[newRequest setDidFinishSelector:@selector(postToWallFinished:)];

whenver I am trying to post a image that has url on web its perfectly shown in the feed but when I try to provide url of my private server whole "picture" key is removed.

How can I show a uploaded picture on wall. (I have uploaded the image to albums as well, even got the url of uploaded image but it says we cannot stream fbcn images)

1 Answer 1

1

The "picture" key (as you have above) for a post, needs to point to a valid public URL of a photo that Facebook can access.

So something like the following is not going to work:

http://localhost/mypicture.jpg or http://myinternalserver/mypicture.jpg

You mention a "url from a private server", if that URL is not accessible from the Facebook servers over the internet than Facebook is going to ignore the URL and move onto the other keys in the post.

As you said did work for you, you are going to need to provide a non-Facebook based url like:

http://www.mypublicserver.com/mypicture.jpg

Also based on the error you are receiving after uploading the photo to a Facebook album, I'm guessing Facebook doesn't allow self referential photo links. They do some very large scale caching and CDN work, so providing a link to a photo already on Facebook I could definitely see causing problems for them to process.

You may want to think about what experience you are trying to provide the end user as well. If you want to upload a photo and have the photo as the main experience, taking advantage of a users/pages Photos/Albums may be the better way to go vs. trying to create a Post, which by it's nature is designed to share something on another non-Facebook web site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.