I want to get the cover of an album with an specific height and width, or, in fact, a square thumbnail generated by default in the Facebook Api.
I only get the album ID and its cover ID.
If I use $facebook->api('/'.$cover_id) then the API method returns me only 6 sizes of this image, but I want to get a thumbnail.
This is possible?
Try This may be this help full for you
https://developers.facebook.com/docs/reference/api/photo/
Related
I have a page that displays a series of available items for the public to purchase. Each of these items displays the image for the related product. My cfimage code is made to scale-to-fit the stored image.
Normally the displayed results will all show different products and their corresponding images. However, when I use the code all of my products show the same image, instead of showing the images that are linked to each product via a file path stored in the database. Is there a way to set the "name="myImage" dynamically so that each image will display and scale properly?
I am trying to find a way to create a custom image field that can take extra crop information.
A custom image field that creates two db columns one for image path the other is for image's crop information (it will be dynamic top, left, width, height informations that user can set via a js component ).
Can a model field be customized to create and validate two db columns? Or is this a wrong way to go?
Django model fields can only map to one database column, so until they provide an easy solution it's not possible.
You can take a look at this workaround.
Anyway what you can do is override the model save method and use PIL for example to crop the image and set it equal to the cropped image field.
To override an model field, it's pretty simple and easy and you can pass extra parameter. Check the documentation everything is well explained.
I have added an open graph image to my site but in the news feed it is not scaled correctly. The image is clipped both at the top and at the bottom. The image itself is a png with the size of 1500x1500px.
Looking at my profile page where the image is placed to the left of the text it scales correctly.
I have specified the following meta tags: og:title, og:type, og:image, og:url, and og:description.
I use the ShareThis API for the actual share button (if that can have anything to do with this).
Has anyone had this problem as well?
From this question, I know that we can obtain user profile picture in square shape by appending ?type=square in Graph API URL , such as :
https://graph.facebook.com/{FACEBOOK_USER_ID}/picture?type=square
But how about the images in wall post ? I know that I can obtain the picture URLs ( of different dimensions ) by this Graph API call :
https://graph.facebook.com/{OBJECT_ID}/
However, the type parameter does not support square. It supports thumbail, normal and album only. But none of them returns the square image shown in timeline . ( I also need the reposition information, as I used the "Reposition Photo" in Timeline ). Does Graph API provide such information ?
Note: I use PHP , but I think the programming language is independent
No, the Graph API does not provide the data on how the photo is repositioned on a Timeline or Newsfeed.
In the context of the API, "Square" does not refer to any photo size of equal dimensions. But rather it refers to the image used as the user's avatar next to posts. So given this logic, regular photo objects would not include a "square" implementation because that photo will never be used as an avatar. If you want an image of equal dimensions on each side, you'll have to implement that yourself.
Is there a way to draw the taskbar thumbnail preview on my own, instead of letting Windows draw it for me?
What I need is a dynamic thumbnail; for example, let's say I want the thumbnail to be a reverse of the "real" thumbnail. Any way to do that?
Yeah you can do with this method: DwmSetIconicLivePreviewBitmap.
Complete example: http://msdn.microsoft.com/en-us/library/ff819048(v=vs.85).aspx