Jump to content
UBot Underground

C# Facebook post on group`s wall


Recommended Posts

Hi everyone.

im trying to post some text and link on group`s wall, but i dont know where i can find/parse/etc.

 params of Post-request:


some params i can parse in response of LinkPreview-request.

function, that trying to post:
 

public static string PostPost(CookieDictionary cookies, string img, string title, string desc, string favicon, string proxy, string param, string grLnk, string myUrl, string imgsrc, string[] logTime, string medium, string LinkPreview)
        {
            string content = "";

            using (var request = new HttpRequest())
            {

                request.UserAgent = HttpHelper.ChromeUserAgent();

                request.AddHeader("Accept", "*/*");
                request.KeepAlive = true;
                request.AddHeader("Referer", grLnk);
                request.Cookies = cookies;

                string _user = StringHelper.Substring(param, ":{\"viewer\":", ",");
                string _rev = StringHelper.Substring(param, "\"revision\":", ",");
                string fb_dtsg = StringHelper.Substring(param, "name=\"fb_dtsg\" value=\"", "\"");

                var cityParams = new RequestParams();

                cityParams["target_id"] = "0";
                cityParams["__user"] = _user;
                cityParams["__a"] = "1";
                cityParams["__dyn"] = "";
                cityParams["__req"] = "21";
                cityParams["fb_dtsg"] = fb_dtsg;
                cityParams["ttstamp"] = "";
                cityParams["__rev"] = _rev;


                string city = request.Post("https://www.facebook.com/ajax/places/city_sharer_reset.php", cityParams).ToString();

                city = StringHelper.Substring(city, "\"citypageid\":\"", "\"");

                string group = request.Get(grLnk).ToString();

                string targetid = StringHelper.Substring(group, "group_id=", "\"");
                string xhpc_composerid = StringHelper.Substring(group, "name=\"xhpc_composerid\" value=\"", "\"");
                string xhpc_publish_type = StringHelper.Substring(group, "name=\"xhpc_publish_type\" value=\"", "\"");
                string xhpc_ismeta = StringHelper.Substring(group, "name=\"xhpc_ismeta\" value=\"", "\"");
                string xhpc_context = StringHelper.Substring(group, "name=\"xhpc_context\" value=\"", "\"");
                

                string appid = StringHelper.Substring(param, "appid=", "&");
                /////////////////

             

                ///////
                var UrlParams = new RequestParams();

                UrlParams["composer_session_id"] = "";
                UrlParams["fb_dtsg"] = fb_dtsg;
                UrlParams["xhpc_context"] = xhpc_context;
                UrlParams["xhpc_ismeta"] = xhpc_ismeta;
                UrlParams["xhpc_timeline"] = "";
                UrlParams["xhpc_composerid"] = xhpc_composerid;
                UrlParams["xhpc_targetid"] = targetid;
                UrlParams["xhpc_publish_type"] = xhpc_publish_type;
                UrlParams["clp"] = "{\"cl_impid\":\"????\",\"clearcounter\":0,\"elementid\":\"u_jsonp_2_x\",\"version\":\"x\",\"parent_fbid\":" + targetid + "}";
                UrlParams["xhpc_message_text"] = Vars.message;
                UrlParams["xhpc_message"] = Vars.message;
                UrlParams["aktion"] = "post";
                UrlParams["app_id"] = appid;
                UrlParams["attachment[params][urlInfo][canonical]"] = myUrl;
                UrlParams["attachment[params][urlInfo][final]"] = myUrl;
                UrlParams["attachment[params][urlInfo][user]"] = myUrl;
                UrlParams["attachment[params][urlInfo][log]["+logTime[0]+"]"] = myUrl;
                UrlParams["attachment[params][urlInfo][log][" + logTime[1] + "]"] = myUrl;
                UrlParams["attachment[params][favicon]"] = favicon;
                UrlParams["attachment[params][title]"] = StringHelper.Substring(LinkPreview, " name=\"attachment[params][title]\" value=\"", "\"");
                UrlParams["attachment[params][summary]"] = StringHelper.Substring(LinkPreview, " name=\"attachment[params][summary]\" value=\"", "\"");
                UrlParams["attachment[params][images][0]"] = imgsrc;
                UrlParams["attachment[params][medium]"] = medium;
                UrlParams["attachment[params][url]"] = myUrl;
                UrlParams["attachment[type]"] = StringHelper.Substring(LinkPreview, " name=\"attachment[type]\" value=\"", "\"");
                UrlParams["link_metrics[source]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[source]\" value=\"", "\"");
                UrlParams["link_metrics[domain]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[domain]\" value=\"", "\"");
                UrlParams["link_metrics[base_domain]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[base_domain]\" value=\"", "\"");
                UrlParams["link_metrics[title_len]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[title_len]\" value=\"", "\"");
                UrlParams["link_metrics[summary_len]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[summary_len]\" value=\"", "\""); 
                UrlParams["link_metrics[min_dimensions][0]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[min_dimensions][0]\" value=\"", "\"");
                UrlParams["link_metrics[min_dimensions][1]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[min_dimensions][1]\" value=\"", "\"");
                UrlParams["link_metrics[images_with_dimensions]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_with_dimensions]\" value=\"", "\"");
                UrlParams["link_metrics[images_pending]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_pending]\" value=\"", "\""); ;
                UrlParams["link_metrics[images_fetched]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_fetched]\" value=\"", "\""); ;
                UrlParams["link_metrics[image_dimensions][0]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[image_dimensions][0]\" value=\"", "\"");
                UrlParams["link_metrics[image_dimensions][1]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[image_dimensions][1]\" value=\"", "\""); ;
                UrlParams["link_metrics[images_selected]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_selected]\" value=\"", "\""); ;
                UrlParams["link_metrics[images_considered]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_considered]\" value=\"", "\""); ;
                UrlParams["link_metrics[images_cap]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_cap]\" value=\"", "\""); ;
                UrlParams["link_metrics[images_type]"] = StringHelper.Substring(LinkPreview, " name=\"link_metrics[images_type]\" value=\"", "\""); ;
                UrlParams["composer_metrics[best_image_w]"] = "100";
                UrlParams["composer_metrics[best_image_h]"] = "100";
                UrlParams["composer_metrics[image_selected]"] = "0";
                UrlParams["composer_metrics[images_provided]"] = "1";
                UrlParams["composer_metrics[images_loaded]"] = "1";
                UrlParams["composer_metrics[images_shown]"] = "1";
                UrlParams["composer_metrics[load_duration]"] = "42";
                UrlParams["composer_metrics[timed_out]"] = "0";
                UrlParams["composer_metrics[sort_order]"] = "";
                UrlParams["composer_metrics[selector_type]"] = "UIThumbPager_6";
                UrlParams["is_explicit_place"] = "";
                UrlParams["composertags_place"] = "";
                UrlParams["composertags_place_name"] = "";
                UrlParams["tagger_session_id"] = logTime[1];
                UrlParams["action_type_id[0]"] = "";
                UrlParams["object_str[0]"] = "";
                UrlParams["object_id[0]"] = "";
                UrlParams["og_location_id[0]"] = "";
                UrlParams["hide_object_attachment"] = "0";
                UrlParams["og_suggestion_mechanism"] = "";
                UrlParams["og_suggestion_logging_data"] = "";
                UrlParams["icon_id"] = "";
                UrlParams["composertags_city"] = "";
                UrlParams["disable_location_sharing"] = "false";
                UrlParams["composer_predicted_city"] = city;
                UrlParams["nctr[_mod]"] = "pagelet_group_composer";
                UrlParams["__user"] = _user;
                UrlParams["__a"] = "1";
                UrlParams["__dyn"] = "";
                UrlParams["__req"] = "d";
                UrlParams["ttstamp"] = "";
                UrlParams["__rev"] = _rev;

                var response = request.Post("https://www.facebook.com/ajax/updatestatus.php?__av="+_user, UrlParams);

                content = response.ToString();


            }



            return content;
        }

I dont know where i can parse composer_session_idclp and tagger_session_id :( 

Please, help ,e :unsure:
  :unsure: 

Link to post
Share on other sites

Link explains how you can do it by reading and processing the header after login to then post as needed or get groups list

 

http://www.codeproject.com/Articles/721524/m-Facebook-with-Csharp

i read all info, and where i can found some info about composer_session_idclp and tagger_session_id?

 

i did not find any actual information :(

 

please, help me! it is very urgently

 

p.s. sorry for the mistakes in English

 

 

Link to post
Share on other sites

in the reference i gave you he mentions that the header is after login redirect, and grab the cookies from the header and session data to analyze it.

 

the class c# file is given in the reference to help you reproduce it.

 

Im not at the pc at the moment and cant open visual studio and provide a lot of testing to find the solution for you.  however the reference i gave you should step by step walk you through it.

Link to post
Share on other sites

in the reference i gave you he mentions that the header is after login redirect, and grab the cookies from the header and session data to analyze it.

 

the class c# file is given in the reference to help you reproduce it.

 

Im not at the pc at the moment and cant open visual studio and provide a lot of testing to find the solution for you.  however the reference i gave you should step by step walk you through it.

I have not found anything useful. Please help!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...