I would like to get the ids and thumbnail image sources of pictures belonging to a certain album.I have the user_photos permission and the album_id is that of the app_user.
So far, I have tried:
https://graph.facebook.com/<album_id>?fields=photo&access_token=...
^Returns too much data like comments and tags and whatnot. I'd like to avoid that.
And FQL:
SELECT pid,src_small FROM photo WHERE aid="album_id"
url:
https://graph.facebook.com/fql?q=SELECT+pid,src_small+FROM+photo+WHERE+aid=" <album_id>"&access_token=...
Gets an empty result.
I'm planning to write an ajax photo-selector to work with my app :(
According to https://developers.facebook.com/docs/reference/fql/photo/
"src_small" -> The URL to the thumbnail version of the photo being queried. The image can have a maximum width of 75px and a maximum height of 225px. This URL may be blank.
Maybe you can try "images" instead.
For example,
SELECT pid,images FROM photo WHERE aid="album_id"
Then select one url by size range of the photo you need.
Related
This code is processed as goku image on FB chat:
[[236823566443944]][[236823583110609]][[236823586443942]][[236823596443941]][[236823609777273]]
[[236823629777271]][[236823636443937]][[236823649777269]][[236823663110601]][[236823673110600]]
[[236823683110599]][[236823686443932]][[236823696443931]][[236823699777264]][[236823709777263]]
[[236823716443929]][[236823733110594]][[236823736443927]][[236823749777259]][[236823753110592]]
[[236823756443925]][[236823759777258]][[236823769777257]][[236823779777256]][[236823783110589]]
[[236823789777255]][[236823793110588]][[236823796443921]][[236823806443920]][[236823809777253]]
How FB creates image from this? I found the code on symbols-n-emoticons in comments below, copied&pasted into FB chat and - black magic - the image was there.
So I took your example and did some testing. If yout right click on the image in chat and look at it URL, you can find following:
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/227547_236823636443937_1841629131_n.jpg
It's one tile from the goku image. The middle part of the URL corresponds to one value in you code. So this code are actually shortcuts to images stored on FB servers, and the chat window simply replaces the code with image.
I think it could be due to latest update in FB, which allows you to attach images directly to posts.
[EDIT]
I have tried several other images and it worked for all images hosted akamaihd.net aka Facebook hosting. Just grab the secod number and past it in chat in double brackets.
The image is always resized to 16x16px, hence the code for Goku is so long, it's actually made from tiles.
I am using Facebook graph API to get Facebook details. But I am getting profile image as resized.
E.g.:
I tried changing _s to _n. But still am getting size of 180x134. But original image size is 260 × 194.
How can I get the original images without resizing in iphone?
Use this:
http://graph.facebook.com/[page id/profile id]/picture?type=large
If you want to get the exactly image size, you can try fql query
$fql="SELECT id, width, height, url, is_silhouette, real_width, real_height FROM profile_pic WHERE id=me() AND height=260 AND width=194";
$avt = $facebook->api(array(
'method'=>'fql.query',
'query' =>$fql,
));
$avt = & $avt[0]['url'];
I am using php, you can learn more here
I seem to have uncovered a bug on the Facebook API.
This is related to the picture related to an event.
When retrieving pictures through the graph for profiles and events you should use the following link:
http://graph.facebook.com/{eventid}/picture
For events that have already occurred (i.e in the past) this works as expected, but when you try to retrieve the picture for a forthcoming event, such as:
https://graph.facebook.com/323879667682222/picture
The actual image can not be found and the default grey icon is shwown.
(ps. the link above is related to an event scheduled to occur on 3rd May)
Can you please confirm that this is a bug, and if there is any other way to retrieve event images from the graph.
Thanks,
Wez
You can retrieve the event profile image with an FQL query like this:
SELECT pic, pic_square, pic_small, pic_big FROM event WHERE eid=EVENT_ID
This call returns urls to the event profile image in 4 sizes:
pic - maximum width of 100px and a maximum height of 300px.
pic_square - width and height of 50px.
pic_small - maximum width of 50px and a maximum height of 150px.
pic_big - maximum width of 200px and a maximum height of 600px.
You can read more about the event table fields in the Facebook Developer pages: FQL Event table.
it is indeed a bug, came across the same. I'm doing a FQL query now:
$url = 'http://api.facebook.com/method/fql.query?query=select name, pic_small, pic_big, pic, host, description, start_time, end_time, location, venue from event where eid="'.$post.'"';
if($sxe = new SimpleXMLElement($url, NULL, TRUE)){
$urlimg = $sxe->event->pic_big;
}
or with the facebook php api:
Helle every one,
I'm currently working with a Facebook page RSS feed and I need to retrieve images on it.
the problem is that those images are just thumbnail. I would like to donwload the big one.
For exemple I have these feed : https://www.facebook.com/feeds/page.php?id=126044397444435&format=rss20
I have this image on the feed : https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/393656_257350694313804_126044397444435_712409_344887174_s.jpg
But I would like this one : https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s320x320/393656_257350694313804_126044397444435_712409_344887174_n.jpg
How can I solve this problem ?
Thanks !
Look at the URLs
https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/393656_257350694313804_126044397444435_712409_344887174_s.jpg
https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s320x320/393656_257350694313804_126044397444435_712409_344887174_n.jpg
The subdomain for the large image is fbcdn-sphotos-a instead of fbcdn-photos-a, it has a s320x320 directory name inserted before the filename, and the filename is suffixed with _n instead of _s
The 320x320 is a max size, the following url returns the image at 480 px height
https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-ash4/s480x480/393656_257350694313804_126044397444435_712409_344887174_n.jpg
I tried To Parse the response of the of the youtube RSS feed and displayed it in tableview...
I works fine except i can't fetch URL for the thumbnil image of the video from rss... It comes in description tag and inside description tag there is a whole div (html)... is there any simpler way example tutorial.....to fetch the thumbnil image from youtube rss...
Thanks
i have the same prob ,but have figured out with YOUtube API ,
make your feed url in this pattern
http://gdata.youtube.com/feeds/base/users/[INSERT USERNAME]/uploads
after in the generated xml there is a media:thumnail tag where u can used to display youtube thumnails images.
without using this format u will get a descr tag with div style image thumbnail quite hard to parse as it is a html part,
better try this,i have solved this using type of feed pattern