3

I followed this link OAuth 2.0 In .NET With Instagram API, and it helped me fix my issue with getting my access token.

My code is this:

NameValueCollection parameters = new NameValueCollection
                                             {
                                                 {"client_id", ClientId},
                                                 {"client_secret", ClientSecretId},
                                                 {"object", "user"},
                                                 {"aspect", "media"},
                                                 {"verify_token", "thisIsANormalSubscription"},
                                                 {"callback_url", CallbackURI}
                                             };

        WebClient client = new WebClient();
        var result = client.UploadValues(SubscriptionURI, parameters);

SubscriptionURI = "https://api.instagram.com/v1/subscriptions".

I'm following the guide from instagram(http://instagram.com/developer/realtime/) including all the parameters for the POST request. But I only get the 400 error when it does the client.UploadValues.

PS:This is my first post, so might not be as appealing for the eye as I would wish

Community
  • 1
  • 1

2 Answers2

0

if you have your access token you can use this plugin I found, it gets the most recent photos from a user.

Instagram .NET

Mike
  • 1,884
  • 2
  • 24
  • 42
  • You can access the plugin [here](http://codecanyon.net/item/instagram-net/5396378?WT.ac=category_item&WT.seg_1=category_item&WT.z_author=dego89)...I'll look into why the site is down – Mike Oct 30 '13 at 17:08
  • It still doesn't answer my question tho, only bypasses it with a plugin. – Bjørn-Vegard Thoresen Oct 31 '13 at 08:32
  • if you're still looking to get access to that site, its not possible at this time. I ran that site, it had information pertaining to instagram's API and plugin information, and unfortunately I don't have time to maintain it anymore. If you have other questions pertaining to the plugin, I'm glad to help. – Mike Nov 01 '13 at 14:28
0

If you're using the Instasharp Client API (https://github.com/InstaSharp/InstaSharp) you can do something like this:

    public InstagramConfig Config 
    {
        get
        {
            return new InstagramConfig(InstagramAuthorisationModel.ApplicationId, InstagramAuthorisationModel.Secret);
        }
    }

public void YourSubscribeMethod(string searchTerm)
{
    var result = await new Subscription(Config).CreateTag(searchTerm))
}

where InstagramAuthorisationModel is a class that holds your registered application id and secret You can create subscriptions for Geography, (CreateGeography), User (CreateUser) and (CreateLocation) methods.

Damian Green
  • 6,895
  • 2
  • 31
  • 43