How to Use FBML to Display Your Profile Photo on a Custom Facebook Fan Page

On custom Facebook pages images must exist on your own server (or somewhere else on the internet) and linked to from the Facebook page code. The only images that can be uploaded directly to Facebook are the logo for your fan page and the image used on your profile page. FBML provides code that will pull your profile or logo picture to your fan page so you don't have to link to it from a different server. Here's how you do it.

The fbml tag is fb:profile-pic and looks like the following:

The only required attribute is uid. This is the ID number for the profile or fan page. Locating the UID is easier said than done but, then this is Facebook ;-)

To get the uid for your profile photo go to your photos tab. Click on any photo. In the address bar in your web browser, the url will end with id=629152408. That number is the uid you use with the fbml profile pic code. To get the uid for your fan page, click on the logo. The url in the address bar of your web browser will end with id=84300445447. That number is the uid.

Please note that in the above examples I have used my own uid's. Your numbers will be different. Other attributes for profile-pic are optional.

uid - the id number for the profile or fan page (this is not optional)
size - the size of the image. Values can be thumb (50px wide), small (100px wide), normal (200px wide), and square (50px by 50px). The default used is thumb is a size isn't specified. If you want to set a specific size, use width and height, which are listed below.
linked - makes the image link to the user's profile. The default is true, which links to the page
width - sets the width of the image in pixels
height - sets the height of the image in pixels
Kim Woodbridge is a WordPress and Facebook Consultant. You can visit her website, (Anti) Social Development

Article Source: http://EzineArticles.com/?expert=Kim_Woodbridge

No comments:

Post a Comment