I was able to figure it out. Here's my code, what do you think?
@using Skybrud.Social.Facebook
@using Skybrud.Social.Facebook.Objects
@using Skybrud.Social.Facebook.Responses
@using Skybrud.Social.Umbraco.Facebook.PropertyEditors.OAuth
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@{
// Get the OAuth information stored in the property
FacebookOAuthData facebook = Model.GetPropertyValue("facebook") as FacebookOAuthData;
// Check whether the OAuth data is valid
if (facebook != null && facebook.IsValid)
{
var service = facebook.GetService();
var posts = service.Posts.GetPosts("clientFanPageAlias");
<ul>
@foreach(var item in posts.Body.Data.Where(p => p.Type.In("photo","video","link")).Take(5))
{
<li>@item.Message</li>
}
</ul>
}
}
Facebook Fan Page
Let me start by saying thank you for the package!
It was very easy to hookup to my profile but I need a clients fan page and pull posts in from that. Is this possible?
Thanks!
Justin
I was able to figure it out. Here's my code, what do you think?
Hi Justin,
I haven't tested your code, but it looks correctly. For pages you can simply specify the alias of the page - exactly as you have done ;)
is working on a reply...