Get big pictures for graph object - facebook

Can I get a big picture for graph objects?
Example:
//take id,name,picture,description from pages, that I like:
http://graph.facebook.com/me/likes?fields=id,name,picture,description&access_token=[token]
But how to get big picture of all these pages in one query? Is this possible?

Ok so essentially, you don't need to request the image at all. Once you have the object_id, and you want to display a large picture, all you have to do is use this URL -
https://graph.facebook.com/OBJECT_ID/picture?type=large
I don't store any profile picture URL's anymore, all I have to do is know the user/page_id and I have access to the profile picture via that object_id.
For an <img> element, just place the URL in the src attribute -
<img src="https://graph.facebook.com/OBJECT_ID/picture?type=large" />

Related

show shared image as thumbnail in facebook sharing in Laravel

I am trying to add share button to albums in website created in Laravel. I have used the code for share button that generated using facebook/developer. The albums are not fixed. It is displaying by fetching from database. So I changed code little to change the link of each album automatically as given below.
<div class="fb-share-button" data-href="http://mysite/albumphotos/{{$album->name}}" data-layout="button">
</div>
But if I try to share into my facebook account, it is showing some other images in my website. How can I show images in my particular album as thumbnail while sharing??
Can anyone help?
As mentioned by #CBroe, first things first:
Make sure you have the proper OG Meta Tags
Run one of the albums' link in the debugger and check if the crawler is pulling the right info
If the date from step 2 doesn't match what you are looking for, update your OG meta tags and try again.

Graph API: Post Image to User's wall (without Album)

I am somewhat desperate posting images via the graph api to a user's page.
What I want to achieve is: I've got an image in an amazon S3 bucket. I'm using the /userid/photos endpoint to post the image url and the message property like:
{
"url": "http://url.to/image.jpg",
"message": "Image description"
}
Now, the API creates an album called: "AppName Photos". When I post multiple time to the same album, it suddenly arranges all images in a view, but I want them to be seperate posts each by each.
So, what I want to achieve is: Post an image to a user's page without putting it into an album, as if the user uploaded the image hisself.
www.klout.com is able to do this. When I try to share & upload a custom image, the image is being stored in the "Chronic photos". How can I store the image there and not in an app-dependent album?
Got it. Simply iterate over all albums (you need user_photo access) and post to that specific album of type "wall".
It is not the most beautiful solution I've ever seen but at least it works and prevents grouping nicely :)

Want a specific image for fb liking an article on site..different images when posting articles on fb

I have a like button that works and that takes the image I have specified through the following parameter and attaches to a user liking the post on there feed.
<meta property="og:image" content="http://www.mysite.org/images/logo_50x50.gif" />
I basically want to use this image only for my users when they like an article, but when posting from a specific article "on my facebook site"..I want to be able to still select the images pulled up from that link. That doesn't happen. All I get right now is what I specified in my og:image parameter.
How would I achieve this?
You can't, you just told Facebook which image to use - it's supported to have multiple og:image tags but i'm not sure if which image to display is deterministic, random, or uses a picker like the system used when you don't specify an image

How do i get someones profile picture to display back to them?

How do i get someones profile picture to diplay back to me. I have already gotten permissions to use the user's pictures etc i just don't know how to use their profile picture and display it back to them.
Any help would be awesome
Calling on the Graph API
http://graph.facebook.com/[id]/picture
The following will give you different sizes
http://graph.facebook.com/[id]/picture?type=square
http://graph.facebook.com/[id]/picture?type=normal
http://graph.facebook.com/[id]/picture?type=large
So you can just put these URLs straight in an <img> tag
EG: <img src="http://graph.facebook.com/4/picture?type=square" />
See:
http://developers.facebook.com/docs/reference/api/#pictures
These are in the public domain, so there is no need for any authentication.

Limiting the number of thumbnails on facebook share

So I want users to be able to share this link on facebook but I want only a specific picture to be the thumbnail for this sharing picture and no other images that appear on my web site
I read the documentation about facebook share and I got this
http://developers.facebook.com/docs/share
Basically what I understand is that
<link rel="image_src" href="thumbnail_image" / >
should do what I want. However, I cannot get this to work. My site is programmed using rails and, inside the layout, I have the above tag to take in an image url coming from a model instance.
Does anyone know how to use this properly? Am I misunderstanding something about this tag? I want to disable user from selecting through the images that I have on my page and just allow the user to share with only 1 image which I have to specify.
To specify a specific picture you will need to add open graph meta tags to your page. Take a look at http://developers.facebook.com/docs/opengraph/.
The open graph tag for your case is: og:image