Exemple #1
0
        public ActionResult Index(string returnUrl, string access_token)
        {
            ViewBag.ReturnUrl = returnUrl;
            access_token      = "240696675.7be60d8.5b05a483ebaf4418b6745157bdaee9a4";
            Instagram.api.Configuration config = new Instagram.api.Configuration(
                @"http://*****:*****@"https://api.instagram.com/v1/",   //instagramapibase,	//base url of the instagram api http://instagram.com/api/v1/
                null                                //webproxy		//string representing a web proxy: 127.0.0.1:8080
                );

            //99aec15ab7704a23ab072551b8f65c99
            InstagramApiWrapper _api = InstagramApiWrapper.GetInstance(config);

            if (access_token != null)
            {
                var x = _api.CurrentUserRequestedBy(access_token);

                var x2 = _api.CurrentUserFollowedBy(access_token, "240696675");
            }

            return(View());
        }
Exemple #2
0
        public ActionResult Index(string returnUrl, string access_token)
        {
            ViewBag.ReturnUrl = returnUrl;
            access_token = "240696675.7be60d8.5b05a483ebaf4418b6745157bdaee9a4";
            Instagram.api.Configuration config = new Instagram.api.Configuration(
                @"http://*****:*****@"https://api.instagram.com/v1/", //instagramapibase,	//base url of the instagram api http://instagram.com/api/v1/
                null//webproxy		//string representing a web proxy: 127.0.0.1:8080
            );

            //99aec15ab7704a23ab072551b8f65c99
            InstagramApiWrapper _api = InstagramApiWrapper.GetInstance(config);

            if (access_token != null)
            {
                var x = _api.CurrentUserRequestedBy(access_token);

                var x2 = _api.CurrentUserFollowedBy(access_token, "240696675");
            }

            return View();
        }
        public static InstagramApiWrapper GetInstance(Configuration configuration) {
            lock (threadlock) {
                if(_sharedInstance == null) {
                    _sharedInstance = new InstagramApiWrapper();
                    _sharedInstance.Configuration = configuration;

                }
            }

            return _sharedInstance;
        }