Is it possible to publish a large photo to facebook?
Is it possible using the javascript api to allow a user to post a larg开发者_运维问答e photo to their facebook wall? e.g. 500px x 500px, published like a user would normall upload a photo.
All I have been able to achieve so far is small thumbnails.
I currently have the following:
FB.ui(
{
"method": 'feed',
"attachment":
{
"media": [{
"type": "image",
"src": "image.jpg",
"href": "http://www.example.com/"
}]
}
}, function(response) {
if (response && response.post_id) {
//User posted
} else {
//User didn't post
}
}
)
You're posting to the user's feed connection (i.e a wall post) with an image attached - you should use the API to post to their photos directly to upload a photo (see the Graph API Poto documentation)
[edited because this was 'too vague']
You are posting a 'Post' with an image attached, the image in that case is an attachment to the post, it's not rendered in a large size on Facebook.com.
What you probably should be doing is uploading a photo to the user's 'photos' connection like the documentation i linked. There's also a how-to here: https://developers.facebook.com/blog/post/498
精彩评论