Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
I was able to figure it out. Here's my code, what do you think?
// 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");
@foreach(var item in posts.Body.Data.Where(p => p.Type.In("photo","video","link")).Take(5))
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...
Write your reply to:
Image will be uploaded when post is submitted