Saturday, 15 March 2014

javascript - Facebook JS SDK Posted Photo is cropped -


I am using Facebook JS SDK to upload a photo and comment on my wall. The picture is getting cropped. How can I avoid taking pictures? I searched and could not find any documents on the parameters to be sent with the post command. Image size I'm posting is 800 x 620 pixels.

I suspect that I am missing something very simple

  var wallPost = {message: "My message goes here", picture: "http: // SomeURLToAnImage.Png ", Caption:" Some Captions ", Link:" http: // SomeWebSite "}; FB.getLoginStatus {function (response.status === 'connect') {var uid = response.authResponse.userID; var Access token = response.authResponse.accessToken; FB.api ('/ me / feed' , 'Post', wall post, function (feedback) {// some code here} ` 

First of all, note a small side: you should use getLoginStatus on page log, not just after the API call. Here is an article that How to use GetLoginStatus and stuff:

It's being said, you do not upload a picture yet But you are making a feed post with a link. You can also use it without the need to authorize the user. Or, if you really want to upload an image, then instead Use the last point.

About the size of the images:

Use images with at least 1200 x 630 pixels for best performance on high resolution devices At least In short, you should use images of 600 x 315 pixels to display links page posts with large images.

...

Try to keep your images close to 1. 9 1: 1

Source and more information:

Aspect ratio as possible to display the full image in the news feed without any crop.

No comments:

Post a Comment