Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Sep 07, 2015 @ 14:25
    Ismail Mayat
    0

    Instagram tag search with client_id

    Hi Anders,

    Trying todo tag count for instagram, when i try search from tags end point passing in a valid client_id I get the following error:

    Skybrud.Social.Instagram.Exceptions.InstagramException : The client_id provided is invalid and does not match a valid application.

    The client_id is valid I created it and tested it using https://instagram.com/developer/api-console/?hl=en so works on the api test page but not via skybrud social.

    Regards

    Ismail

  • Anders Bjerner 487 posts 2989 karma points MVP 8x admin c-trib
    Sep 07, 2015 @ 16:41
    Anders Bjerner
    100

    I can't think of anything that would cause the problems that you're describing. Are you absolutely sure that you're using the client ID of your app?

    I've setup this small example and tested it with the client ID of four different apps, and it works like a charm:

    @using Skybrud.Social.Instagram
    @using Skybrud.Social.Instagram.Responses
    @inherits System.Web.Mvc.WebViewPage
    
    @{
    
        InstagramService service = InstagramService.CreateFromClientId("put your client id here");
    
        InstagramRecentMediaResponse response1 = service.Tags.GetRecentMedia("umbraco");
        <p>@response1.Body.Data.Length</p>
    
        InstagramTagResponse response2 = service.Tags.GetTagInfo("umbraco");
        <p>@response2.Body.Data.MediaCount</p>
    
    }
    
  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Sep 08, 2015 @ 07:28
    Ismail Mayat
    0

    Anders,

    I have created the app and am definately using the right client id. One thing to note you are using razor, at the moment i am making my calls in an nunit test project with an integration test. Could that have something todo with it? Also I am using live site url in the instagram manage app. In yours did you use a working site url and are you making that call from that same site?

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Sep 09, 2015 @ 08:32
    Ismail Mayat
    0

    Hi Anders,

    Not sure why but now its all working! Weird no idea why however it works lol. Many thanks for all your help.

    Regards

    Ismail

  • Anders Bjerner 487 posts 2989 karma points MVP 8x admin c-trib
    Sep 09, 2015 @ 09:45
    Anders Bjerner
    0

    Good to see it working. Neither the test project or running the site locally/live should have any effect on this.

Please Sign in or register to post replies

Write your reply to:

Draft