2

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?

4

2 回答 2

3

如果您发布到 me/feed 端点,您将获得缩略图,请参阅https://developers.facebook.com/docs/reference/api/user/#posts

如果您想发布完整的图像,请使用我/照片。

于 2012-12-20T17:47:00.950 回答
1

此方法用于在 facebook 用户的提要(墙)上共享链接。

您不能使用我/提要发布完整图像,它总是将其作为链接发布。你可以用我/照片来放大照片。

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);
        }
});

以上是使用我/照片的方法。

如果这对您有所帮助,请考虑接受我的回答。

于 2012-12-20T20:36:52.850 回答