문제

Facebook API require exact image size to picture upload in user timeline?

I used this code:

$publishStream = $facebook->api("/$session/feed", 'post', array(
            'message' => "Hello World",
            'link'    => 'link_to_app',
            'picture' => APP_URL . 'uploads/share_image.jpg',
            'name'    => 'App name',
            'description'=> 'App description'
            )
        );

I've tried more image size such as 1024x1024, 484x252, etc but in user timeline image appears rectangular while in user profile square. Obviously, if my image is square, the timeline is cut off, and vice versa.

도움이 되었습니까?

해결책

About recommended and minimum image sizes: https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#images

Facebook usually does not make app generated content as prominent as user posted content though, so you may end up with a small squared images in any case...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top