Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API - how to publish/share with big photo

I'm have followed a very clear tutorial to publish (share) a story on fb timeline. You can see the code I am using on my website behind the FB Share button. How can I force the photo to be bigger instead of a thumbnail? What should I add to the js code (FB.ui)? An action? But what should I write it? I am very new to FB api, so please in plain english... Thank you! Paul

like image 407
Paul Godard Avatar asked Sep 19 '12 17:09

Paul Godard


People also ask

What is the largest photo file size you can upload to Facebook?

Files can be as big as 45 MB for JPEG formats or 60 MB for PNGs. JPEGS are recommended and ideally formatted to be between 20-30 MB.

How do I share a Facebook post with API?

Yes, you can share using the graph2 api. The way you do it is to use /feed edge and pass the post's url that you want to share as the link. Standard Fb permissions to the post you are sharing do apply. This was done today, in a local rails app, using FbGraph2 gem, with the above method.

When I share a photo on Facebook What's the image resolution?

The Facebook recommended image size for sharing images and sharing links with an image is 1,200 x 630 pixels. Whether you're sharing landscape, portrait, or square images, Facebook will resize it to 500 pixels wide and scale the height accordingly.


1 Answers

I went through your code. You are using feed method.

FB.ui(
{
method: 'feed',
name: 'Paul Godard – Soul Photography',
link: 'http://www.paulgodard.com/',
picture: 'http://www.gondwanastudio.com/xMedia/Images/Photos/PG_010501-011000/PG_010927.jpg',
source: '',
caption: 'Paul Godard | Soul Photography | Landscape | Nature | Fine Art',
description: 'I am blessed.  I have 2 wonderful children Enya and James and my best friend is their mother, my soulmate for many years.  I live in a wonderful home in Africa, the wildest continent of the world.  I am very privileged and grateful.  There is so much beauty around us but people dont see it anymore...',
message: ''
});

Insted of this, try using photos method as follows

FB.api('me/photos', 'post', {
                        message: 'your message',
                        status: 'success',
                        access_token: access_token,
                        url: 'your_Img_url'
                    }, function(response) {
                    });

Here we are uploading a photo. It will get saved in a new album since we have not created any in above code and a big photo will get posted on your wall.

like image 175
Aniket Sahasrabudhe Avatar answered Sep 29 '22 01:09

Aniket Sahasrabudhe