Reputation: 917
This is the code I am using for posting Image on Wall.
"https://graph.facebook.com/"
+ Login.facebookid
+ "/feed?access_token=" + accesstoken
+ "&method=post"
+ "&message=" + strFullMessage.replaceAll(" ", "%20")
+ "&picture=" + imageUrl
+ "&privacy=" + resp
I am using facebook Graph API to post image on wall.
What I expected is Image will post in exact size as the Image has?
But the image is posted in Thumbnail size.
Why the graph api is taking thumbnail image?
But when I use (/me/photos
),it is taking full image.Why this change in API.
How to post full image using (/me/feed
)? Is this a bug in facebook Graph API?
Upvotes: 2
Views: 4174
Reputation: 506
This method is used to share a Link on facebook user's feed(wall).
You can't post full image using me/feed, It will always post it as a link. You can use me/photos for putting big photos.
FB.api('me/photos', 'post',
{
url:'MY_URL',
href:'MY_LINK,
message: 'photo description',
access_token:accessToken
},
function(response) {
console.log(response);
if (!response || response.error) {
alert('Error occurred');
} else {
alert('Post ID: ' + response.id);
}
});
Above is the method to do it with me/photos.
If this helped you, consider accepting my answer.
Upvotes: 1
Reputation: 5523
If you post to the me/feed endpoint you will get a thumbnail, see https://developers.facebook.com/docs/reference/api/user/#posts
Use the me/photos if you want a full image posted.
Upvotes: 3