Hello Team,
Our requirement is to show the latest images from our instagram account
here are the steps i followed
Installed the package Skybrud.Social.Umbraco
Created a Datatype whose property editor is Skybrud.Social-Instagram OAuth, and added our clientId, clientsecret and Urk and also selected the scopes
Under Document Types, Added this as property for root content
Added this instagram Property in content homepage layout.
5 . Added a instagram.cshtml under Partial Views in settings
and following is the sample code that i have used in this cshtml
@{
// Get the OAuth information stored in the property
var currentContent = Umbraco.TypedContent(UmbracoContext.PageId.Value);
var rootNode = currentContent.AncestorOrSelf(1);
var instagram = rootNode.GetPropertyValue<InstagramOAuthData>("instagram");
<p>hello1</p>
// Check whether the OAuth data is valid
if (instagram != null) {
<p>hello2</p>
}
}
6. added @Html.Partial("instagram") in the page where i want instagram to be shown
Result : hello2 is never displayed which means instagram property is null always
Please help me fix this issue as this is one of the important requirements from our client
Instagram propertyvalue always null
Hello Team, Our requirement is to show the latest images from our instagram account here are the steps i followed
5 . Added a instagram.cshtml under Partial Views in settings and following is the sample code that i have used in this cshtml
@{
} 6. added @Html.Partial("instagram") in the page where i want instagram to be shown
Result : hello2 is never displayed which means instagram property is null always
Please help me fix this issue as this is one of the important requirements from our client
Thankyou
Not sure whether it will help, but you can simplify getting the root node:
Have you double-checked your property is called
instagram
and not something else?Hello Dan, I tried the code which you sent . Still i have the same issue
Yes the property is called as "instagram".
Note : I think there is no problem in getting root as i was able to display all children under this root.
is working on a reply...