Then I tried something in the lines of this hoping to get (more) raw data, but still no picture information - looks like a raw version of the above?
var options = new Skybrud.Social.Facebook.Options.Posts.FacebookPostsOptions();
options.Limit = 3;
var response = service.Posts.Raw.GetPosts("517606015033481", options);
The output format doesn't really matter. JSON or strongly typed objects - I just need to be able to get an array or list with the pictures in the Facebook posts.
Right now it is kind of trial and error. Can anyone give me a hint in the right direction? Feels like I am missing an option somewhere.
For recent versions of the Facebook API, only a few fields are returned by default, so you need to specify them explicitly. You can read more about that here: http://social.skybrud.dk/facebook/fields/
Here is a quick example for getting posts:
FacebookGetPostsOptions options = new FacebookGetPostsOptions("umbraco") {
Fields = "id,message,picture"
};
foreach (FacebookPost post in facebook.Posts.GetPosts(options).Body.Data) {
<p>@post.Id (@post.Picture)</p>
}
Facebook posts are missing picture information
I am trying to fetch posts (with pictures) from a Facebook Page. For starters I used this example; http://social.skybrud.dk/facebook/authentication/app-access-token/ - Text and datetime is fetched, but the "picture" string is empty.
Then I tried something in the lines of this hoping to get (more) raw data, but still no picture information - looks like a raw version of the above?
var options = new Skybrud.Social.Facebook.Options.Posts.FacebookPostsOptions(); options.Limit = 3; var response = service.Posts.Raw.GetPosts("517606015033481", options);
The output format doesn't really matter. JSON or strongly typed objects - I just need to be able to get an array or list with the pictures in the Facebook posts.
Right now it is kind of trial and error. Can anyone give me a hint in the right direction? Feels like I am missing an option somewhere.
Hi Morten,
For recent versions of the Facebook API, only a few fields are returned by default, so you need to specify them explicitly. You can read more about that here: http://social.skybrud.dk/facebook/fields/
Here is a quick example for getting posts:
You can find a list of all supported fields in the Facebook documentation: https://developers.facebook.com/docs/graph-api/reference/v2.5/post#fields
Thank you. Upgrading the DLL to the latest release also helped :-)
is working on a reply...