public static string CreateFacebookImageUrl(long facebookID, eFacebookImageType imgType) { string imgTypeStr = String.Format("{0}", (imgType == eFacebookImageType.Default) ? (Config.FacebookSettings.FacebookDefaultImageIsNormal ? eFacebookImageType.Normal : eFacebookImageType.Large) : imgType); imgTypeStr = imgTypeStr.ToString().ToLower(); var photoUrl = String.Format("https://graph.facebook.com/{0}/picture?type={1}", facebookID, imgTypeStr); if (imgType == eFacebookImageType.Source) { //photoUrl = FacebookHelper.GetProfilePictureSource(FacebookApp facebook, long fbUserId) } return photoUrl; }
public static string RenderFacebookImageTag(long fbId, eFacebookImageType imageType, string cssClass) { string imageUrl = CreateFacebookImageUrl(fbId, imageType); string imageTag = String.Format("<img src=\"{0}\" class=\"{1}\" border=\"0\" />", imageUrl, cssClass); return imageTag; }