summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/FacebookRM/src/communication.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index f4e6881e4f..dbc41f1640 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -315,7 +315,6 @@ std::string facebook_client::choose_server( int request_type, std::string* data,
case FACEBOOK_REQUEST_APPROVE_FRIEND:
case FACEBOOK_REQUEST_LOAD_REQUESTS:
case FACEBOOK_REQUEST_SEARCH:
- case FACEBOOK_REQUEST_STATUS_SET:
return FACEBOOK_SERVER_MOBILE;
// case FACEBOOK_REQUEST_LOGOUT:
@@ -324,6 +323,7 @@ std::string facebook_client::choose_server( int request_type, std::string* data,
// case FACEBOOK_REQUEST_FEEDS:
// case FACEBOOK_REQUEST_NOTIFICATIONS:
// case FACEBOOK_REQUEST_RECONNECT:
+// case FACEBOOK_REQUEST_STATUS_SET:
// case FACEBOOK_REQUEST_MESSAGE_SEND:
// case FACEBOOK_REQUEST_MESSAGE_SEND2:
// case FACEBOOK_REQUEST_THREAD_INFO:
@@ -439,7 +439,7 @@ std::string facebook_client::choose_action( int request_type, std::string* data,
}
case FACEBOOK_REQUEST_STATUS_SET:
- return "/a/home.php";
+ return "/ajax/updatestatus.php?__a=1";
case FACEBOOK_REQUEST_MESSAGE_SEND:
return "/ajax/mercury/send_messages.php?__a=1";
@@ -1187,23 +1187,15 @@ bool facebook_client::set_status(const std::string &status_text)
{
handle_entry( "set_status" );
- std::string data = "&fb_dtsg=" + (this->dtsg_.length() ? this->dtsg_ : "0");
- //data += "&target_id=" + this->self_.user_id;
+ if (status_text.empty())
+ return handle_success( "set_status" );
- if ( status_text.length( ))
- {
- /*
- TODO: privacy options
- status=v%C5%A1ichni &update=P%C5%99idat+p%C5%99%C3%ADsp%C4%9Bvek&users_with=&at=&privacy=%7B%22value%22%3A80%2C%22row_updated_time%22%3A1360357575%2C%22_pr_%22%3A1360357575%7D
- status=p%C5%99%C3%A1tel%C3%A9&update=P%C5%99idat+p%C5%99%C3%ADsp%C4%9Bvek&users_with=&at=&privacy=%7B%22value%22%3A40%2C%22row_updated_time%22%3A1360357601%2C%22_pr_%22%3A1360357601%7D
- status=jen+j%C3%A1+ &update=P%C5%99idat+p%C5%99%C3%ADsp%C4%9Bvek&users_with=&at=&privacy=%7B%22value%22%3A10%2C%22row_updated_time%22%3A1360357610%2C%22_pr_%22%3A1360357610%7D
- status=aaa+ro &update=P%C5%99idat+p%C5%99%C3%ADsp%C4%9Bvek&users_with=1438384745&at=&privacy=%7B%22value%22%3A10%2C%22row_updated_time%22%3A1360357631%2C%22_pr_%22%3A1360357631%7D&tagged_friends%5B%5D=1438384745
- */
-
- data += "&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&update=&target=";
- data += "&status=" + utils::url::encode( status_text );
- //data += "&profile_id=" + this->self_.user_id;
- }
+ // TODO: use also privacy options
+ std::string data = "&fb_dtsg=" + (this->dtsg_.length() ? this->dtsg_ : "0");
+ data += "&xhpc_targetid=" + this->self_.user_id;
+ data += "&__user=" + this->self_.user_id;
+ data += "nctr[_mod]=pagelet_composer&__a=1&__req=b&phstamp=&composertags_place_name=Miranda+NG";
+ data += "&xhpc_message=" + utils::url::encode(status_text);
http::response resp = flap( FACEBOOK_REQUEST_STATUS_SET, &data );