Example #1
0
        public void CreateFacebookEvent()
        {
            var e = new Event()
            {
                Description = "desc test",
                Name = "name test",
                StartDateTime = DateTime.UtcNow.AddDays(5),
                EndDateTime = DateTime.UtcNow.AddDays(6),
                Venue = new Venue()
                {
                    StreetLine1 = "Univerisity St. 10",
                    StreetLine2 = string.Empty,
                    City = "Seattle",
                    State = "Washington",
                    Country = Country.US,
                    Lat = 1.123f,
                    Lon = 12.123f
                }
            };

            Mock<IRepository> mockRepo = new Mock<IRepository>();
            var oauth = new OAuthHandler();
            oauth.Token = "";
            //var fbAcct = new FacebookAccount(mockRepo.Object, oauth);

            //fbAcct.CreateFacebookEvent(actv);
        }
Example #2
0
        public ActionResult About()
        {
            FacebookWebAuthorizer fwa = new FacebookWebAuthorizer(new PraLoupFacebookApplication(), HttpContext);
            fwa.Permissions = new string[]{"publish_stream"};
            fwa.ReturnUrlPath = HttpContext.Request.Url.ToString();
            if (fwa.Authorize())
            {
                var oAuth = new OAuthHandler();

                //Get the access token and secret.
                oAuth.Token = FacebookWebContext.Current.AccessToken;
                Friends f = new Friends(oAuth);
                FriendsLists fl = new FriendsLists(oAuth);
            }

            return View();
        }
Example #3
0
 public FriendsLists(OAuthHandler oAuth)
 {
     string url = "https://graph.facebook.com/me/friendlists?access_token=" + oAuth.Token;
     string json = oAuth.WebRequest(OAuthHandler.Method.GET, url, String.Empty);
 }
Example #4
0
 public FriendsLists(OAuthHandler oAuth)
 {
     string url  = "https://graph.facebook.com/me/friendlists?access_token=" + oAuth.Token;
     string json = oAuth.WebRequest(OAuthHandler.Method.GET, url, String.Empty);
 }