Supporting picture links on graph objects

Jul 1, 2010 at 5:28 PM

FYI, the current OpenGraph.NET API doesn't expose picture links on graph objects

Picture links sort of look like connection objects, except that they are just magic urls (see http://developers.facebook.com/docs/api scroll down to Pictures section). 

 From a data binding standpoint it is conveinent to have these be properties, so I enabled this very easily by modifying the GraphEntity object:

 public class GraphEntity
{

... 



        /// <summary>
        /// Square (50x50) picture for this object
        /// </summary>
        public string Picture_Square
        {
            get
            {
                return this.BaseUri + "/picture?type=square";
            }
        }

        /// <summary>
        /// Small picture (50 wide X variable height)
        /// </summary>
        public string Picture_Small
        {
            get
            {
                return this.BaseUri + "/picture?type=small";
            }
        }

        /// <summary>
        /// Large picture (200 wide X variable height)
        /// </summary>
        public string Picture_Large
        {
            get
            {
                return this.BaseUri + "/picture?type=large";
            }
        }
}