Esempio n. 1
0
        public string POSTStatus(string id = "me", string message = "", string tags = "")
        {
            string url  = "https://graph.facebook.com/" + id + "/feed?message=" + System.Web.HttpUtility.UrlEncode(message) + " " + Script.MakeTags(tags) + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).POST();

            return(data);
        }
Esempio n. 2
0
        public string GETUser()
        {
            string url  = "https://graph.facebook.com/me?fields=cover,age_range,name,gender,birthday&access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 3
0
        public string GETPhotos(string id)
        {
            string url  = "https://graph.facebook.com/" + id + "/photos?access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 4
0
        public string UPDATEComment(string id, string text = "")
        {
            string url  = "https://graph.facebook.com/" + id + "?message=" + text + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).POST();

            return(data);
        }
Esempio n. 5
0
        public string GETNotifications()
        {
            string url  = "https://graph.facebook.com/me?fields=notifications.limit(10).include_read(true){id,title,link,unread}" + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 6
0
        public string GETReactionsPost(string id, string type = React.LIKE)
        {
            string url  = "https://graph.facebook.com/" + id + "/reactions?summary=total_count&type=" + type + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 7
0
        public string POSTComment(string id, string text = "", string tags = "")
        {
            string url  = "https://graph.facebook.com/" + id + "/comments?message=" + System.Web.HttpUtility.UrlEncode(text) + " " + Script.MakeTags(tags) + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).POST();

            return(data);
        }
Esempio n. 8
0
        public string POSTReactionsPost(string id, string type = React.LIKE)
        {
            string url  = "https://graph.facebook.com/" + id + "/reactions?type=" + type + "&access_token=" + this.access_token;
            string data = new WEBAPI(url).POST();

            return(data);
        }
Esempio n. 9
0
        public string CheckToken()
        {
            string url  = "https://graph.facebook.com/me/permissions?access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 10
0
        public string GETAvatar(string id)
        {
            string url  = "https://graph.facebook.com/" + id + "/picture?type=large&redirect=false&access_token=" + this.access_token;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 11
0
        public string DELETEObject(string id)
        {
            string url  = "https://graph.facebook.com/" + id + "?&access_token=" + this.access_token;
            string data = new WEBAPI(url).DELETE();

            return(data);
        }
Esempio n. 12
0
        public string GETHome(string limit = "10", string offset = "0")
        {
            string url  = "https://graph.facebook.com/me/home?fields=id,description,message,created_time,from,comments,status_type,likes,type,link,object_id,full_picture,source&access_token=" + this.access_token + "&offset=" + offset + "&limit=" + limit;
            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 13
0
        public string GETInbox(string id = "me")
        {
            //string url = "https://graph.facebook.com/me/inbox?access_token=" + this.access_token;
            //string url = "https://graph.facebook.com/fql?q=SELECT viewer_id,recipients,message_count FROM thread WHERE folder_id = 0 ORDER BY message_count DESC&access_token=" + this.access_token;
            //string url = "https://graph.facebook.com/fql?q=select viewer_id,thread_id,message_count from thread where viewer_id = me() and folder_id = 0&access_token=" + this.access_token;
            string url = "https://graph.facebook.com/fql?q=select updated_time,snippet_author,snippet,recipients,viewer_id,thread_id,message_count from thread where folder_id = 0&access_token=" + this.access_token;

            string data = new WEBAPI(url).GET();

            return(data);
        }
Esempio n. 14
0
        public string GetAccessToken(string user, string pass)
        {
            string key = "";

            key += "api_key=" + this.ApiKey;
            key += "&email=" + user;
            key += "&format=JSON";
            key += "&locale=vi_vn";
            key += "&method=auth.login";
            key += "&password="******"&return_ssl_resources=0";
            key += "&v=1.0";
            key += "&sig=" + CreateSig(user, pass);
            string  url    = "https://api.facebook.com/restserver.php?" + key;
            string  result = new WEBAPI(url).GET();
            dynamic data   = JsonConvert.DeserializeObject(result);

            return(data["access_token"]);
        }