array(                'url' => $image_url,                'caption' => $caption,                'published' => 'true',                'access_token' => QA_FB_PAGE_TOKEN            ),            'timeout' => 60        )    );} /* ==============================     TWITTER POST============================== */ function qa_post_to_twitter($image_url, $caption) {     // STEP 1: Upload media    $media_response = qa_twitter_oauth_request(        'https://upload.twitter.com/1.1/media/upload.json',        array('media' => base64_encode(file_get_contents($image_url))),        'POST'    );     if (empty($media_response->media_id_string)) return;     // STEP 2: Post tweet    qa_twitter_oauth_request(        'https://api.twitter.com/1.1/statuses/update.json',        array(            'status' => $caption,            'media_ids' => $media_response->media_id_string        ),        'POST'    );} /* ==============================     TWITTER OAUTH CORE============================== */ function qa_twitter_oauth_request($url, $params, $method = 'POST') {     $oauth = array(        'oauth_consumer_key' => QA_TW_CONSUMER_KEY,        'oauth_token' => QA_TW_ACCESS_TOKEN,        'oauth_nonce' => wp_generate_password(12, false),        'oauth_timestamp' => time(),        'oauth_signature_method' => 'HMAC-SHA1',        'oauth_version' => '1.0'    );     $base_params = array_merge($oauth, $params);    ksort($base_params);     $base_string = strtoupper($method) . "&" .        rawurlencode($url) . "&" .        rawurlencode(http_build_query($base_params, '', '&', PHP_QUERY_RFC3986));     $signing_key = rawurlencode(QA_TW_CONSUMER_SECRET) . '&' .                   rawurlencode(QA_TW_ACCESS_SECRET);     $oauth['oauth_signature'] = base64_encode(        hash_hmac('sha1', $base_string, $signing_key, true)    );     $header = 'OAuth ';    $values = array();    foreach ($oauth as $key => $value) {        $values[] = $key . '="' . rawurlencode($value) . '"';    }    $header .= implode(', ', $values);     $args = array(        'headers' => array('Authorization' => $header),        'body' => $params,        'timeout' => 60    );     $response = wp_remote_request($url, array_merge($args, array('method' => $method)));     return json_decode(wp_remote_retrieve_body($response));} Responsibility claimed over deadly attack against Afghan President Ashraf Ghani s event attack in Kabul – TIMES OF ISLAMABAD
Times of Islamabad

Responsibility claimed over deadly attack against Afghan President Ashraf Ghani s event attack in Kabul

Responsibility claimed over deadly attack against Afghan President Ashraf Ghani s event attack in Kabul

KABUL: Daesh on Monday claimed responsibility for the attack that hitAfghan capital during two separate presidential inaugurations of rivalpoliticians Ashraf Ghani and Abdullah Abdullah.

Earlier in the day, during the presidential inaugurations two loud blastswere heard in Kabul.

Hundreds of people had assembled at two venues inside the presidentialpalace complex to watch the swearing-in ceremonies for President AshrafGhani and challenger Abdullah Abdullah, when the blasts were heard,prompting some to flee.

“I have no bulletproof vest on, only my shirt, I will stay even if I haveto sacrifice my head,” Ghani told the remaining crowd, as sirens soundedoverhead.

The bomb blasts take place days after the United States and the Talibansigned a historic peace deal in Doha.

The bitter feud between President Ashraf Ghani and his former chiefexecutive Abdullah Abdullah has raised fears for Afghanistan´s fragiledemocracy as the US prepares to leave the country.

Polls were held in September, but repeated delays and accusations of voterfraud meant that Ghani, the incumbent president, was only declared aswinner of a second term in February — sparking a furious response fromAbdullah, who vowed to form his own parallel government.

On Monday Ghani, dressed in traditional Afghan clothing and white turban,arrived at the presidential palace to be sworn in, surrounded bysupporters, senior political figures, diplomats and foreign dignitariesincluding US special envoy Zalmay Khalilzad.

Minutes earlier, in another corner of the sprawling presidential palacecompound, a suit-clad Abdullah inaugurated himself as president, vowing to”safeguard the independence, national sovereignty, territorial integrity”of Afghanistan.

As hundreds of people watched Ghani´s ceremony, two loud explosions wereheard prompting some people to flee.

An AFP reporter saw many of those who fled return to their seats afterGhani´s refusal to leave the podium prompted cheers and applause.

The game of thrones has strained the patience of the internationalcommunity and Afghans alike, with Washington warning earlier that thebickering posed a risk to the US withdrawal deal, which requires theTaliban to hold talks with Kabul.

Widening divisions among Afghan politicians would leave the insurgents withthe upper hand in those negotiations. -APP/AFP