Fb:photo
From Facebook Developer Wiki
Contents |
Description
Renders a Facebook photo.
Attributes
| Required | Name | Type | Description | |
| required | pid | string | An API-supplied pid of the photo. The pid cannot be longer than 50 characters. (The use of a pid found in the query string of a photo URL on Facebook is deprecated.) | |
|---|---|---|---|---|
| optional | uid | int | (Deprecated) If the pid is not an API-supplied pid, this should be the ID parameter in the query string used to find the pid. This property is not supported in the XFBML variant of this tag and is deprecated for the FBML variant. | |
| size | string | The size of the photo to display. (Default value is normal.). Other valid values are thumb (t) (75px width), small (s) (max of 130px width or height), and normal (n) (max of 604px width or height). | ||
| align | string | The image's alignment. (Default value is left.) and the only other valid value is right. |
Examples
If you're formatting the tag as FBML, you don't need to use a closing tag.
<fb:photo pid="12345" />
If you're formatting the tag as XFBML for Facebook Connect, you must use a closing tag.
<fb:photo pid="12345"></fb:photo>
Notes
- The
pidreturned after making an FQL call is not the samepidfound in the string of a photo URL. Please only use thepidfound via the API.
- If the user is not able to see the photo, then the photo will not be rendered. To provide an alternate user interface for those users, you can use the fb:if-can-see-photo tag.
- There are 2 undocumented parameters width and height. By setting these you can scale an image to the preferred size. Keep in mind that this will use in-browser scaling and results may vary depending on the browser
