How to get bigger size pictures if me/home items in facebook sdk - asp.net-mvc

Now i'm using Facebook SDK on my ASP.NET MVC5 project, and for data query I use Graph Api.
When I read a data from "me/home", almost each read item of it have key called "picture", that represents image attached to post. But it is thumnbail size, how can I get it bigger resolution and better quality?
Link i got look smth like this:
https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/s130x130/1902827_682459971849744_3936731463452030828_n.jpg?oh=a31397c18fc806dcd1b60565009fd50b&oe=54BAA327&gda=1420888048_5c40d0ab0d0b0f5636d7965138f7f6ab
I hope for your help.
Thank you for your time

There is a variable in the API "type" using that you can specify the sizes of the image
The type parameter can be one of square, small, normal, or large for profile pictures or thumbnail, normal, album for album pictures.
image src would be something like this
https://graph.facebook.com/xxx/picture?access_token=yyy&type=normal
you can find more information # http://developers.facebook.com/docs/reference/api/user/

string imageUrl = fb.Get("/me?fields=picture.type(large)").ToString();

Related

photoswipe: pid/gid link to particular photo

I wonder how photoswipe builds URL to a particular image in a gallery?
I see that for each image in a gallery the following URL is built: [BASE_URL]#&gid=2&pid=3. If I get it right, the pid/gid values are taken in the order of gallery/photo appearance on a page. Which presents problem for dynamic content when galleries/photos are shuffled (sorted, deleted, etc.)
Is there a way to overrule that logic such that static ID's (e.g. database PK's) are used?
Thank you.
After digging into the sources I found out that if gallery element has attribute data-pswp-uid= set to some value, then that value is used in URL as gid.
Unfortunately, same trick on an image/figure didn't do.

How to upload multiple pictures to Volusion through API

This is my Volusion item insert method, which relies on the HTTParty gem for rails. It works for posting items without photos, and posting items with a single photos by using the <PhotoURL_Large> and <PhotoURL_Small> XML tags.
def self.post_volusion_item(hide_product, product_code, product_name, product_description, availability, custom_field1, custom_field2, enable_options_inv_control, free_shipping_item, height, length, width, metatag_description, metatag_title, photo_alt_text, photo_xml, product_category, product_price, product_weight, metatag_keywords)
encrypted_password = ENV['VOLUSION_PASSWORD']
post_url = "https://WEBSITE-HERE/net/WebService.aspx?Login=LOGIN-HERE&EncryptedPassword=#{encrypted_password}&Import=Insert"
body = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><Volusion_API><Products><HideProduct>#{hide_product}</HideProduct><ProductCode>#{product_code}</ProductCode><ProductName>#{product_name}</ProductName><ProductDescription>#{product_description}</ProductDescription><Availability>#{availability}</Availability><CustomField1>#{custom_field1}</CustomField1><CustomField2>#{custom_field2}</CustomField2><EnableOptions_InventoryControl>#{enable_options_inv_control}</EnableOptions_InventoryControl><FreeShippingItem>#{free_shipping_item}</FreeShippingItem><Height>#{height}</Height><Length>#{length}</Length><Width>#{width}</Width><METATAG_Description>#{metatag_description}</METATAG_Description><METATAG_Title>#{metatag_title}</METATAG_Title><Photo_AltText>#{photo_alt_text}</Photo_AltText><PhotoURL_Large>#{photo_url_large}</PhotoURL_Large><PhotoURL_Small>#{photo_url_small}</PhotoURL_Small><ProductCategory>#{product_category}</ProductCategory><ProductPrice>#{product_price}</ProductPrice><ProductWeight>#{product_weight}</ProductWeight><METATAG_Keywords>#{metatag_keywords}</METATAG_Keywords></Products></Volusion_API>"
post(post_url, body: body)
end
I can not find any documentation that gives an example with multiple photos in the item. I have tried duplicating the calls. Example: <PhotoURL_Large>img1</PhotoURL_Large><PhotoURL_Small>img1</PhotoURL_Small><PhotoURL_Large>img2</PhotoURL_Large><PhotoURL_Small>img2</PhotoURL_Small>
This resulted in no images uploading.
I am realizing the the PhotoURL is not related to the urls of the item's photos, but only tied to the data in Volusion's add item form.
Can someone point me in the right direction for accessing the true photo urls for volusion items?
In Volusion, PhotoURL_Small and PhotoURL_Large are alternate image URLs that can either point to an internal or external location. Volusion only provides one of each for each product code which will be used by the product in place of any loaded image. So if you populate any of the above two fields for that product it will use that URL in place of any image uploaded via the image manager or any images directly uploaded via FTP. There is no provision in the software for additional PhotoURL_Small and PhotoURL_Large images.
Here is an excellent explanation of image file structure.
Image structure

IOS facebook graph api - get large picture from posts

I get posts using:
https://graph.facebook.com/FANPAGENAME/posts?access_token=MYTOKEN
One of the element of the result is:
"picture": "URLOFTHEIMAGE"
URLOFTHEIMAGE is the URL of the small picture, I need the large one.
Is it possible? How can i get it?
Thank you
If you check, you'll also get a key: object_id from the api call you are doing.
Make the API call : http://graph.facebook.com/object_id - Example
You'll get an array- images, fetch the image that you like.

Comparing images using google custom search api

I've researching for a project and I want to know whether it's possible to compare images to each other using the google custom search api.
Ie, can I upload an image into a program o mine, and with an algorithm I'll provide, search for any photo's using the API , that match the image in terms of exif tags such as: Exif.Photo.ColorSpace , xif.Photo.FocalPlaneXResolution, xif.Photo.FocalPlaneYResolution etc.
Thanks.
Some of these options are available in JSON API:
https://developers.google.com/custom-search/json-api/v1/reference/cse/list
E.g.:
imgColorType
imgDominantColor
imgSize
imgType

could not be able to get image from url and set to image view in flex

Any body help me I want to get image from yahoo weather rss and set the source of my flex component, I'm now able get other data from yahoo weather rss but still not able to get image please help me I have got other data in this way could-not-be-able-to-get-data-from-yahoo-weather-rss-in-flex
please give me some hint to get that images
Ok, at last today I got idea about how to set image, not about get image, from yahoo weather api or rss feed. So, I tried to get code of condition and set my own image placed in my assets folder like this:
var codeOfCondition:XMLList = result_weather_data_xml.descendants().attribute("code");
and then tried :
if(codeOfCondition == 0){image.source = "assets/CORRESPONDING_IMAGE_TO_CODE";// for all conditions there should be corresponding image}
and this solves the problem for me, there may be some other way to do that but this is my approach thanks.

Resources