Protik PC

Protik PC

  • NA
  • 2
  • 872

Anybody here know how to work with Skybrud.Social package --

Jul 28 2017 1:53 PM
Hi there, everybody.
My first ever forum post on here.

I need some help with working with the Skybrud.Social nuget package. It's known to be quite handy for Instagram related coding. In my application, basically all I am required to do, is fetch a definite number of the most popular insta_ posts [say 25] based on a definite search tag, say 'GlacialMelting'. And of course show them in my application.

Let me post some code::
  1. @using WTRD.UI.Models  
  2. @using WTRD.UI.HelperClasses  
  3. @using TweetSharp;  
  4. @using TweetSharp.Model;  
  5. @using Skybrud.Social;  
  6. @using Skybrud.Social.Instagram  
  7. @using Skybrud.Social.Instagram.Options.Tags  
  8. @using Skybrud.Social.Instagram.Responses  
  9. @inherits WebViewPage<Skybrud.Social.Instagram.InstagramService>  
  10.   
  11. <script type="text/javascript">  
  12.       
  13. </script>  
  14. <style type="text/css">  
  15.     .insta:not(:first-child)  
  16.     {  
  17.         padding-top:9px;  
  18.     }  
  19.     .insta .li{  
  20.         float:none  
  21.     }  
  22. </style>  
  23.   
  24. @{  
  25.   
  26.     List<Skybrud.Social.Instagram.Objects.InstagramMedia> temp_1 = new List<Skybrud.Social.Instagram.Objects.InstagramMedia>();  
  27.      
  28.     InstagramService service = InstagramService.CreateFromClientId(System.Configuration.ConfigurationManager.AppSettings["instaID"].ToString());  
  29.   
  30. ---->    InstagramGetTagRecentMediaOptions option1 = new InstagramGetTagRecentMediaOptions  
  31.     {  
  32.         Tag = "ClimateChange",  
  33.         Count = 15  
  34.     };  
  35.   
  36.     InstagramGetRecentMediaResponse response1 = Model.Tags.GetRecentMedia(option1);  
  37.     
  38.     temp_1.AddRange(response1.Body.Data);  
  39.     if (temp_1.Count == 0)  
  40.     {  
  41.   
  42.         option1.MaxTagId = response1.Body.Pagination.NextMaxId;  
  43.         response1 = Model.Tags.GetRecentMedia(option1);  
  44.         temp_1.AddRange(response1.Body.Data);  
  45.     }  
  46.   
  47.     <table class="table list">  
  48.         @{  
  49.             int nr = 1;  
  50.             foreach (Skybrud.Social.Instagram.Objects.InstagramMedia media in temp_1)  
  51.             {  
  52.                 <tr>  
  53.                     <td><strong>@(nr++).</strong></td>  
  54.                     <td><code>@media.Id</code></td>  
  55.                     <td class="nw">@media.Created.ToLocalTime()</td>  
  56.                     <td>  
  57.                         <img src="@media.Thumbnail" style="float: left;" />  
  58.                         <div style="margin-left: 160px;">  
  59.                             @media.CaptionText  
  60.                         </div>  
  61.                     </td>  
  62.                 </tr>  
  63.             }  
  64.         }  
  65.     </table>  
  66.   
  67.   
  68.       
See the line I arrowed above. I am getting a red wobbly over
  1. InstagramGetTagRecentMediaOptions option1 = new InstagramGetTagRecentMediaOptions
  2. {
  3. Tag = "ClimateChange",
  4. Count = 15
  5. }

What assembly reference I have to add to get the InstagramGetTagRecentMediaOptions? I added more or less all the Skybrud.Social namespaces and hierarchial subnamespaces. But still not happening for me. Very unfortunately. Do any of you know how to work with this specific nuget pack? What am I missing? Kindly suggest something. 
Many Thanks.