public string retriveArticleList() { string nextUrl; if( Request.QueryString["nextURL"].ToString() == "" ) nextUrl = "https://graph.facebook.com/177323639028540/feed?access_token=" + Session["SE_OAUTH_TOKEN"]; else nextUrl = Request.QueryString["nextURL"].ToString() + "&access_token=" + Session["SE_OAUTH_TOKEN"]; oAuthFacebook oFB = new oAuthFacebook(); string message = oFB.WebRequest(oAuthFacebook.Method.GET, nextUrl, string.Empty); return message; }
public string post() { oAuthFacebook oFB = new oAuthFacebook(); string message = oFB.WebRequest( oAuthFacebook.Method.POST, "https://graph.facebook.com/177323639028540/feed", "access_token=" + Session["SE_OAUTH_TOKEN"] + "&message=" + Request.Form["message"].ToString() ); return message; }
public ActionResult FacebookLoginCallBack() { if (Request.QueryString["code"] == null) { return View("FacebookLoginCallBackDenided"); } oAuthFacebook oFB = new oAuthFacebook(); oFB.AccessTokenGet(Request.QueryString["code"].ToString()); string profile = oFB.WebRequest(oAuthFacebook.Method.GET, "https://graph.facebook.com/me?access_token=" + oFB.Token, string.Empty); Hashtable data = (Hashtable)JSonParser.JsonDecode(profile); Session["SE_LOGIN_FLAG"] = "FACEBOOK"; Session["SE_OAUTH_TOKEN"] = oFB.Token; Session["SE_FACEBOOK_ID"] = data["id"].ToString(); Session["SE_FACEBOOK_NAME"] = data["name"].ToString(); Session["SE_FACEBOOK_PROFILE_IMAGE_URL"] = "http://graph.facebook.com/" + data["id"].ToString() + "/picture"; data.Clear(); data = null; return View(); }
public RedirectResult LoginInitialize() { oAuthFacebook oFB = new oAuthFacebook(); return new RedirectResult(oFB.AuthorizationLinkGet()); }